Throught pricing routines, units of time must be consistent: time2maturity, rate and volatility must all be measure with respect to the same reference (Years, Months, Weeks, Days). How can I enforce that in the code?
Maybe volatility and rate shouldn't just be standard floats but some user-defined type?
Throught pricing routines, units of time must be consistent: time2maturity, rate and volatility must all be measure with respect to the same reference (Years, Months, Weeks, Days). How can I enforce that in the code? Maybe volatility and rate shouldn't just be standard floats but some user-defined type?