Skip to content

Commit bd97cf8

Browse files
committed
add sample how get deal ended
1 parent 1e9c393 commit bd97cf8

File tree

4 files changed

+466
-4
lines changed

4 files changed

+466
-4
lines changed

absbox/local/component.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1764,8 +1764,6 @@ def readRunSummary(x, locale) -> dict:
17641764
bndSummary = pd.DataFrame(columns=bndStatus[locale], index=list(bndNames))
17651765

17661766
for bn, amt_type, amt, begBal in bond_defaults:
1767-
#bndSummary.loc[bn][_fmap[locale][amt_type]] = amt
1768-
#bndSummary.loc[bn][bndStatus[locale][2]] = begBal
17691767
bndSummary.loc[bn, _fmap[locale][amt_type]] = amt
17701768
bndSummary.loc[bn, bndStatus[locale][2]] = begBal
17711769

@@ -1777,7 +1775,8 @@ def readRunSummary(x, locale) -> dict:
17771775
## Build status change logs
17781776
status_change_logs = [(_['contents'][0], readStatus(_['contents'][1], locale), readStatus(_['contents'][2], locale))
17791777
for _ in filter_by_tags(x, ["DealStatusChangeTo"])]
1780-
r['status'] = pd.DataFrame(data=status_change_logs, columns=dealStatusLog[locale])
1778+
deal_ended_log = [ (_['contents'][0],"DealEnd",_['contents'][1]) for _ in filter_by_tags(x, ["EndRun"])]
1779+
r['status'] = pd.DataFrame(data=status_change_logs+deal_ended_log, columns=dealStatusLog[locale])
17811780

17821781
# inspection variables
17831782
def uplift_ds(df:pd.DataFrame) -> pd.DataFrame:

docs/source/modeling.rst

+4
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,10 @@ Combination Type
312312
* ``("factor", <Formula>, <Number>)`` -> multiply <Number> to a formula
313313

314314
* ``("*", <Formula>, <Number>)`` same
315+
316+
.. versionadded:: 0.27.35
317+
* ``("*", <Formula 1>, <Formula 2>)`` multiply 2 formulas
318+
315319
* ``("max", <Formula>, <Formula>, ...)`` -> get the higher value in the list
316320
* ``("min", <Formula>, <Formula>, ...)`` -> get the lower value in the list
317321
* ``("sum", <Formula>, <Formula>, ...)`` -> sum of formula values

0 commit comments

Comments
 (0)