You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/analytics.rst
+34-3
Original file line number
Diff line number
Diff line change
@@ -1023,10 +1023,10 @@ to view results
1023
1023
1024
1024
r['result']['report']['cash']
1025
1025
1026
-
Pricing
1027
-
^^^^^^^^^^^
1026
+
Pricing & IRR
1027
+
^^^^^^^^^^^^^^^^
1028
1028
1029
-
* User can provide a pricing curve and a pricing data to argument `pricing`,which all future bond cashflow will be discounted at that date with the curve provided.
1029
+
* User can provide a pricing curve and a pricing data to argument `pricing`,which all future bond cashflows will be discounted at that date with the curve provided.
1030
1030
1031
1031
.. code-block:: python
1032
1032
@@ -1048,6 +1048,37 @@ bond cashflow equals to ``<price>``
1048
1048
,"curve":[["2021-01-01",0.025]
1049
1049
,["2024-08-01",0.025]]})
1050
1050
1051
+
* Calculate IRR of bonds
1052
+
1053
+
.. versionadded:: 0.42.4
1054
+
1055
+
User shall input a dict with solo key ``IRR`` and value is a dict with bond name and ``IRR calculate assumption``
1056
+
1057
+
.. code-block:: python
1058
+
1059
+
("pricing"
1060
+
,{"IRR":
1061
+
{"B":<IRR calculate assumption>
1062
+
}
1063
+
}
1064
+
)
1065
+
1066
+
IRR calculate assumption
1067
+
It has three types
1068
+
1069
+
* Holding a bond to maturity
1070
+
``("holding",[<history of cashflow of investment>], <position size>)``
1071
+
1072
+
``{"B":("holding",[("2021-04-01",-500)],500)``
1073
+
* Holding a bond and sell it at a future date
1074
+
``("holding",[<history of cashflow of investment>],<position size>,<sell date>,<sell price>)}``
0 commit comments