View Full Version : How can we find to what correspond some values in a function?
ray444
11-07-2012, 11:14 AM
Hello,
Please find attached a file I found concerning the pricing of an option.
I can't find in the VBA code to what correspond the values: S, X, T, r, v, d
Where are they specified?
Thanks a lot
regards
Bob Phillips
11-07-2012, 11:43 AM
It is explained on their site
In the following code
OptionType is either “C” for a call or “P” for a put
S is the stock price
X is the strike price
T is the time to expiry
r is the risk free rate
v is the volatility
d is the dividend yield
ray444
11-07-2012, 11:48 AM
Hi thanks
I know I read it but how come excel detects the letters as the corresponding variables without being specified in the vba code?
regards
Bob Phillips
11-07-2012, 02:41 PM
It is specified in the code, the parameters are passed in order.
ray444
11-08-2012, 02:29 AM
Thanks a lot xld you mean that
dOne(S, X, T, r, v, d) corresponds in order to StockPrice;StrikePrice;TimeToExpiry;RiskFreeRate;Volatility;Dividend
But how is "C" and "P" mentionned?
Regards
Bob Phillips
11-08-2012, 03:30 AM
Yes, that is what what the website that you read says. In that UDF, it does not use OptionType.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.