Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In a previous assignment, Excel wrote a Macro for you by recording your actions. The language the Macro was written in was Visual Basic, or

image text in transcribed

In a previous assignment, Excel wrote a Macro for you by recording your actions. The language the Macro was written in was Visual Basic, or VBA. You can use VBA to program functions or subroutines for yourself. In this exercise you are to write an interpolation function in VBA. You will need to have the Developer" tab appearing on your ribbon. If it's not there, find "Options" under File or Home, click on "Customize Ribbon" and activate Make a yield curve by interpolating and extrapolating from four given terms and yields. Create a table of values on a spreadsheet as shown below, but with the following terms and yields: Yield 6.00% 8.50% 5.50% 10.50% Term 1.5 Term Yield 1 your value> your value> 3 your value> 5 your value> 1.5 Create a straight-line interpolation function in VBA called, FInterpix, xarray, yarray), that takes as input an array of x values, an array of their matching y values, and the x value for which you want it to interpolate/extrapolate a y value. Instructions for doing this are her Create a new table with column headings Term Interpolated Vlookup true Vlookup false Under "Term", create a column of terms running from 0 to 6.0 by increments of 0.2. In the "Interpolated" column, for each term, call your FInterp to interpolate/extrapolate the yield for that term (If your sheet appears like the one above, the xarray input for the interpolator is SBS5:SBS8, while the yarray is SCS5:SCS8) For comparison, also find what the "vlookup" function produces. In the column beside your "Interpolated" column, use vlookup on the table SBS5:SCS8 for each term, with the optional 4th argument, "Range lookup", set to TRUE" to have vlookup provide the closest match. In the last column again use vlookup, but with ''Range lookup . set to ?ALSE' so that it returns #N/A ?f there is no exact match. (note: with vlookup set to false vlookup may return #N/A even for terms of 3 and 5. The failure to find a match is due to unseen numerical errors somewhere around the 16th decimal place of the value in the "Term" column. Your solution will be accepted even with the #N/As). (a) What value does your interpolator return for a term of 2.0? (b) What value does your interpolator return for a term of 0.6? Answer as a real number lcorrect to 4 decimals In a previous assignment, Excel wrote a Macro for you by recording your actions. The language the Macro was written in was Visual Basic, or VBA. You can use VBA to program functions or subroutines for yourself. In this exercise you are to write an interpolation function in VBA. You will need to have the Developer" tab appearing on your ribbon. If it's not there, find "Options" under File or Home, click on "Customize Ribbon" and activate Make a yield curve by interpolating and extrapolating from four given terms and yields. Create a table of values on a spreadsheet as shown below, but with the following terms and yields: Yield 6.00% 8.50% 5.50% 10.50% Term 1.5 Term Yield 1 your value> your value> 3 your value> 5 your value> 1.5 Create a straight-line interpolation function in VBA called, FInterpix, xarray, yarray), that takes as input an array of x values, an array of their matching y values, and the x value for which you want it to interpolate/extrapolate a y value. Instructions for doing this are her Create a new table with column headings Term Interpolated Vlookup true Vlookup false Under "Term", create a column of terms running from 0 to 6.0 by increments of 0.2. In the "Interpolated" column, for each term, call your FInterp to interpolate/extrapolate the yield for that term (If your sheet appears like the one above, the xarray input for the interpolator is SBS5:SBS8, while the yarray is SCS5:SCS8) For comparison, also find what the "vlookup" function produces. In the column beside your "Interpolated" column, use vlookup on the table SBS5:SCS8 for each term, with the optional 4th argument, "Range lookup", set to TRUE" to have vlookup provide the closest match. In the last column again use vlookup, but with ''Range lookup . set to ?ALSE' so that it returns #N/A ?f there is no exact match. (note: with vlookup set to false vlookup may return #N/A even for terms of 3 and 5. The failure to find a match is due to unseen numerical errors somewhere around the 16th decimal place of the value in the "Term" column. Your solution will be accepted even with the #N/As). (a) What value does your interpolator return for a term of 2.0? (b) What value does your interpolator return for a term of 0.6? Answer as a real number lcorrect to 4 decimals

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Second International Conference Acids Hue City Vietnam March 2010 Proceedings Part 1 Lnai 5990

Authors: Manh Thanh Le ,Jerzy Swiatek ,Ngoc Thanh Nguyen

2010th Edition

3642121446, 978-3642121449

More Books

Students also viewed these Databases questions

Question

HOW MANY TOTAL WORLD WAR?

Answered: 1 week ago

Question

Discuss the scope of financial management.

Answered: 1 week ago

Question

Discuss the goals of financial management.

Answered: 1 week ago