I have to make an excel file for financial options in excel, where it can tell me if the optimal policy for the option is to keep it or exercise it. I have developed how the sockprice and optionprice develops in module1 and module2, but i can't get the formula in module3 to work - it has to tell me "Keep" or "Exercise" due to the equation in "Policygrid(i, time)". I think the problem is that module3 gets data from both module1 and module2 or just that i can't get the "application.if" formula to work.
S = stockprice
X = Exercise price
T = Time
rf = risk free rate
Sigma = volatility
n = number of periods
If you would like to see how module 1 and 2 works try to use the following data:
Mark 6 cells and 6 rows. Use S=100, X=100, T=5, rf=0.05, Sigma=0.2, n=5 in the formula (stockgridVarPeriod and optiongridvarPeriodAmrPut and press ctrl,shift,enter.
I have added an excelfile with the relevant data, where i in the sheet "traditional" shows the exercise policy i would like to make in VBA. Hope one of you can figure it out, and please c/p the modules from below if you would like to help me out.
Module1:
Module2:
Module3:
Bookmarks