Write a function that computes the maverick number

Assignment Help Finance Basics
Reference no: EM131449095

Finance Modeling Assignment -

PROBLEM I - Maverick numbers are named after a famous student who studied Financial Modeling at the University of Texas at Arlington in the 21st century. Maverick numbers are defined as follows.

M(0) = 0

M(1) = 1 + M(0)

M(2) = 2 + M(1)

M(3) = 3 + M(2)

...

M(n) = n + M(n - 1)

(a) Write a function that computes the Maverick number for a user-provided n. You must use recursion in this function.

Name this function "Maverick" and use it to compute Maverick numbers for n = 1, 2, 3, 4, 10, 75, and 100.

(b) Now rewrite the function but you must use Do While in the function. Name this function "Maverick2" and use it to compute Maverick numbers for n = 1, 2, 3, 4, 10, 75, and 100.

PROBLEM II -

Write a macro that uses the Maverick function you have written in Problem I.

- Name your macro as MaverickCalc.

- This macro should ask the user to input the number n as follows: Please input the number n:

- The title of the box that asks for the above input should be: Input for Maverick Number Calculator

- No default input value should be provided for n.

- The result should be displayed in a message box that states the following.

- The Maverick number for n is: (Note that the number n above should be displayed as the actual number provided by the user.)

- The title of the box that provides the above output should be: Maverick number calculator

- The above output should be displayed in an information box (i.e., you need to use VbInformation)

PROBLEM III -

Consider an annuity that pays a fixed amount of C every time period for n periods. If the discount rate is r, the PV of this annuity is:

PV = C/(1 + r) + C/(1 + r)2 + C/(1 + r)3 + ... C/(1 + r)n

(a) Write a function to compute the PV of an annuity. You must use recursion in this function.

Name the function "AnnuityPV" and use it to compute the PV of an annuity that pays $1,000 at the end of each year for the next 7 years. The discount rate is 8% per year.

(b) Now rewrite the function but you must use Do While in the function. Name this function "AnnuityPV2" and use it to compute the PV of an annuity that pays $1,000 at the end of each year for the next 7 years. The discount rate is 8% per year.

PROBLEM IV -

Write a macro that uses the AnnuityPV function you have written in Problem III.

- Name your macro as AnnuityPVCalc.

- This macro should ask the user for the inputs: C, r, and n.

- These inputs should be asked for as follows:

  • Please input the cash flow:
  • Please input the interest rate:
  • Please input the number of periods:

- The title of each of the box that asks for the above input should be: Input for Annuity PV Calculator

- For each of the above, the following default values should be supplied. (User can overwrite these default values to provide the new values.)

- Cash flow of 1,000, interest rate of 5% or 0.05, and number of periods as 10.

- The result should be displayed in a message box that states the following.

- The present value of the annuity is:

- The title of the box that provides the above output should be: Annuity PV Calculator Output

PROBLEM V -

Fibonacci numbers is a sequence of numbers named after Italian mathematician Leonardo Pisano, better known by his nickname of Fibonacci. In this sequence, every number after the first two is the sum of the two preceding ones. The Fibonacci sequence is defined as follows.

F(0) = 0

F(1) = 1

F(2) = F(1) + F(0) = 1 + 0 = 1

F(3) = F(2) + F(1) = 1 + 1 = 2

F(4) = F(3) + F(2) = 2 + 1 = 3

...

In general,

F(n) = F(n - 1) + F(n - 2)

Write the Fibonacci function described above. You must use Do While in this function, Use this function to compute the Fibonacci numbers for n = 1, 2, 4, 8, 12, 16, 20, and 24.

PROBLEM VI -

Write a macro that uses the Fibonacci function you have written in Problem V.

- Name your macro as FibonacciCalc.

- This macro should ask the user to input the number n as follows:

Please input the number n:

- The title of the box that asks for the above input should be:

Input for Fibonacci Calculator

- No default input value should be provided for n.

- The result should be displayed in a message box that states the following.

The Fibonacci number for n is:

(Note that the number n above should be displayed as the number provided by the user.)

- The title of the box that provides the above output should be:

Fibonacci number calculator

- The above output should be displayed in an information box (i.e., you need to use VbInformation)

Reference no: EM131449095

Questions Cloud

Determine the poles of the cltf : Draw the block diagram of the system with a proportional feedback controller and calculate the closed-loop-transfer function (CLTF). Determine the poles of CLTF
Summarizes the cost function for operation : (a) Write an equation that summarizes the cost function for his operation.
Distinguish between economic cost and accounting cost : (a) Distinguish between economic cost and accounting cost. Illustrate with examples.
How do the aggregate demand and aggregate supply curves : How do the aggregate demand and aggregate supply curves differ from each other?
Write a function that computes the maverick number : FINA 5351: Finance Modeling Assignment. Write a function that computes the Maverick number for a user-provided n. You must use recursion in this function
Allowing cotton exports-agricultural adjustment act : Which of the following was not part of the New Deal? Allowing Cotton Exports/ Agricultural Adjustment Act /Slaughtering 6 million Pigs /National Recovery
What supplies your water : What supplies your water? Where is it stored? How does it get to the tap? Is it treated? What is it treated with? Where is it treated?
Workers a wage above the market equilibrium : Why might some firms voluntarily pay workers a wage above the market equilibrium, even in the presence of surplus labor? Check all that apply.
Identify the critical components of logistics operation : Examine the key issues affecting logistics in this example and highlight other examples.

Reviews

len1449095

4/3/2017 3:42:27 AM

Please Note: You should name your submission file as follows: Last Name_First Name_A3. The subject of your submission email should be: Assignment III You will get two extra credit points for the above. Write a function to compute the PV of an annuity. You must use recursion in this function.

Write a Review

Finance Basics Questions & Answers

  Should be willing to pay per share to acquire laces ltd

Using the WACC-DCF approach, how much should Shoes Inc. should be willing to pay per share to acquire Laces Ltd?

  How does this markup depend on the elasticity of demand

We write the percentage markup of prices over marginal cost as (P - MC)/P. For a profit-maximizing monopolist, how does this markup depend on the elasticity of demand? Why can this markup be viewed as a measure of monopoly power?

  Calculate the effective interest rate

A credit union offers a savings account with the interest rate of 10 percent compounded daily. Calculate the effective interest rate if you use 360-day year?

  What are actual additional internal and external challenges

What other, unused variables such as political, economic, financial, legal, ethical, and cultural factors might prove useful when assessing the attractiveness of the remaining less than 35 potential international markets and why?

  Current credit policy relative to the proposed changes

Duff Beer is considering loosening its credit standards and lengthening the terms from net 30 days to net 45. Doing so will result in higher sales but also more defaults and extra administrative costs. Assuming variable costs are 45% of sales and ..

  Calculate the npv of walking the dragline

Calculate the NPV of walking the dragline.

  How would you correct each of the errors

How would you correct each of the errors? Specifically, what actions would you take so that your trail balance would show the correct balances?

  How much of the gain is taxable?

A couple has owned and lived in their personal residence for 10 years. They purchased the home for $300,000. They sell the home for $900,000. How much of the gain is taxable?

  The zocco corporation has an inventory conversion period of

mcdowell industries sells on terms of 310 net 30. total sales for the year are 912500. forty percent of customers pay

  Is the australian dollar expected to get stronger or weaker

The exchange rate for the Australian dolllar is currently 1.40 Australian dollars/US$. This exchange rate is expected to rise by 10% over the next yerar. Is the Australian dollar expected to get stronger or weaker, nd why?

  What is the cost of borrowing the maximum amount of credit

What is the cost of borrowing the maximum amount of credit available to MDM through factoring? Assume 30 day month and 360 day year.

  Why the earnings per share of barnes enterprises changed

If all the shares of Noble Corporation are exchanged for those of Barnes Enterprises on a share-for-share basis, what will postmerger earnings per share be for Barnes Enterprises?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd