Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

BFC5936 Financial Modelling

Mid-Semester Take-Home Assessment

This Assessment is worth 20% of your final grade for this unit. The assessment is to complete a    spreadsheet containing 3 VBA Tasks, the instructions for each task are detailed in this document.

These tasks are examples of Coding Interview Questions, something an employer would ask      you to complete during a limited amount of time in a pre-interview environment. They are designed to challenge your algorithmic thinking and ability to solve unique problems with the coding               fundamentals you have learned so far.

The weighting of the three tasks is indicated with each task's instructions, and all cells on each    sheet are weighted equally. These VBA tasks will be automatically marked the week after you  submit, so please refrain from editing the structure of the workbook in any way other than what is described in your instructions.

This is an individual task, and requires each student to make a submission. Please make sure that you enter your name and Authcate correctly using the dialog box that prompts for this        information when you first open the file.

The task is due Monday the 11th of April at 4:30PM, and is designed to take you between 2 and  5 hours of dedicated work. Downloading this task will be taken as a waiver of the right to request    special consideration, that is if you download the task you are agreeing that you are able to attempt it over the required dates.

If you are unable to undertake this assessment over the required dates, for any pre-approved reason, a deferred version will be organised, please contact staff ASAP.

 

Individual Spreadsheet Task 1 (30%)

In this task you are required to write a modified matrix multiplication FUNCTION.

This function should work as a generic matrix multiplication function, whilst also achieve the following tasks:

    Should be able to take in ANY 2 matrices and multiply them if they conform.

●    Function should create a MessageBox Error if the Matrices do not conform, and output the error code to the cell: “NC-ERR

The error code should appear in every cell in the designated green output area. For any given dot product the matrix conducts, it should also achieve the following:

-     In both matrices, replace any numbers with a magnitude less than 2 with 1

-     In the first matrix, negative numbers get rounded to the nearest integer.

-     In the second matrix, positive numbers get multiplied by 3

-     If the final dot product result is less than 0, replace the output with the string NEGATIVE” (without the quotation marks)

 

Individual Spreadsheet Task 3 (40%)

In this task you are required to write a FUNCTION that finds the first duplicate in a set of integers. This function should be designed as;

FirstDuplicate(InputData)

This function will take as input 1 range of cells, of any size, that contain only integers.                  The function should find the first number in the set that has a duplicate integer (exact match) later in the set, even if there are multiple duplicates in the set.

The function should return the first duplicate integer if it exists, and the string Clean!” if there are

no duplicates.                                                                                       (without the quotation marks)

Examples provided to clarify the functionality:


There are multiple places on your spreadsheet where this function needs to be executed, and you

must use a subroutine to execute and output this functions result to the sheet.

HINT: You may need to look into the use of the Exit For command!


Individual Spreadsheet Task 3 (30%)

Using a SUBROUTINE you must complete the following;

Calculate 4 sets of different returns based on the closing prices given, each calculated using a different technique.

1.   Daily Simple Arithmetic Returns - formula is provided below:

 

2.   Daily Log Returns (natural log; ln) - formula is provided below:

 

3.   Cumulative Geometric Average Returns - formula is provided below.

 

Note, this is not a daily return, but a cumulative over the whole series of prices.

4.   Use the Daily Simple Arithmetic Returns ( 1) to calculate a 3-Day Moving Average Return.

Note: A moving average is defined as the arithmetic average return of the previous n-day returns - an example provided:

 

5.   After you've calculated all the previous statistics, output a BUY” signal in any row where all four previous statistics are a positive number (>0).

All other cells in this column should be left blank.