waifod / quant_finance_models

Project containing the implementations of quantitative finance models
MIT License
5 stars 1 forks source link

Get current time in Black-Scholes model #60

Closed waifod closed 1 year ago

waifod commented 1 year ago

This deals with issue https://github.com/Waifod/quant_finance_models/issues/18.

We need to provide the correct current time for the model to determine the time to expiration and therefore the fair price.

Here we are assuming that the system_clock epoch coincides with the Unix epoch, which is true from C++20 and the de facto standard in the previous versions.