Skip to content

Commit

Permalink
update regression and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowbean committed Feb 13, 2025
1 parent 98e311f commit 43146dd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions absbox/tests/regression/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,12 @@ def test_asset_02(setup_api):
,read=True)
assert ppyRate(r[0])[1:] == [0.02, 0.02, 0.02]+[0.03]*6

@pytest.mark.skip(reason="public server doesn't support this test due to performance")
@pytest.mark.analytics
def test_first_loss(setup_api):
r0 = setup_api.runFirstLoss(test01
,"A1"
,poolAssump=("Pool",("Mortgage",{"CDRPadding":[0.01,0.02]},{"CPR":0.02},{"Rate":0.1,"Lag":5},None)
,None
,None)
)
assert r0['contents'][0] == 31.6013610271222
closeTo(r0['contents'][0], 31.60100353659348, r=6)
8 changes: 7 additions & 1 deletion docs/source/analytics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,13 @@ User can input with an assumption with one more field ("Bond Name") compare to s
* bond name
The engine will stress on the default assumption till the bond incur a 0.01 loss.
Then engine return a tuple with the factor it used and the stressed assumption.
Then engine return a tuple
* The factor it used and the stressed assumption.
* The assumption was applied to make the bond incur first 0.01 loss.
.. warning::
The iteration begins with stress 500x on the default assumption. Make sure the default assumption is not zero
.. code-block:: python
Expand Down
4 changes: 3 additions & 1 deletion docs/source/modeling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,9 @@ Compare with a date-based curve

Compare with a index-based curve
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* ["periodRateCurve", <formula>, ">", <Selector Formula>, <curve>] -> true when <formula> greater than a value query from a curve by <selector> formula
.. versionadded:: 0.42.3

* ``["periodRateCurve", <formula>, ">", <Selector Formula>, <curve>]`` -> true when <formula> greater than a value query from a curve by <selector> formula

.. seealso::

Expand Down

0 comments on commit 43146dd

Please sign in to comment.