Closed gpelleri closed 1 year ago
The date should be passed as a time in years. See other functions.
I'm not sure to get what you want, do you have any example since i'm unsure about what to look for ? Like is it a matter of changing type (using datetime ?) or do you rather want to pass a single argument called "maturity" , which be will the time to expiry in years and get rid of valuation_date & expiry_date ?
The date should be passed as a time in years. So you pass in (date - valuationDate) / DaysInYears. The argument should not depend on knowledge of the internal implementation of the date class.
See other functions.
Hello Sir I added a to_float method in the Date class, to allow acess to the already existing (private) parameter _excel_date , which is a float. I'm using this method whenever we're calling the barrier options pricing functions to pass floats instead of Date. Let me know if this is fine,
Gautier