Skip to content

Commit

Permalink
Merge pull request #37 from mandeepsingh-private/patch-1
Browse files Browse the repository at this point in the history
Update basics.rst
  • Loading branch information
nhaga committed Dec 21, 2021
2 parents e6633e8 + e2bddb0 commit 3a816c7
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions docs/basics.rst
@@ -1,15 +1,24 @@
******
Basics
******

Below are the commands to set up the Quant Lib with evaluation date. Everything starts with "evaluation date" which means the date you want to value a instrument. Consider you want to value a "Swap" as of 09/16/2020, you will first set the evaluationDate in QuantLib.
Settings
########

.. code-block:: python
#immport the Qunat Lib
import QunatLib as ql
# Let the today date whenwe want to value a instrument be
today = ql.Date(15,6,2020)
# we can set evaluationDate in QL as
ql.Settings.instance().evaluationDate = today
print(ql.Settings.instance().evaluationDate);
# prints..June 15th, 2020
# or you can do
today = ql.Date(15,12,2021);
ql.Settings.instance().setEvaluationDate(today)
print(ql.Settings.instance().evaluationDate)
# prints..December 15th, 2021
Moves date of referenced curves:
Expand Down

0 comments on commit 3a816c7

Please sign in to comment.