meenmo / isda_simm Goto Github PK
View Code? Open in Web Editor NEWImplementation of ISDA SIMM v2.3~2.6
License: MIT License
Implementation of ISDA SIMM v2.3~2.6
License: MIT License
Hello,
Now, i have the following error:
C:\Users\dizri\Desktop\ISDA_SIMM-main\src\agg_margins.py:84: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
df_main = pd.concat([df_main, df_local_sensiType])
C:\Users\dizri\Desktop\ISDA_SIMM-main\src\agg_margins.py:90: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
df_risk_class = pd.concat([df_risk_class, df_local_riskType])
C:\Users\dizri\Desktop\ISDA_SIMM-main\src\agg_margins.py:84: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
df_main = pd.concat([df_main, df_local_sensiType])
C:\Users\dizri\Desktop\ISDA_SIMM-main\src\agg_margins.py:90: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
df_risk_class = pd.concat([df_risk_class, df_local_riskType])
C:\Users\dizri\Desktop\ISDA_SIMM-main\src\agg_margins.py:84: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
df_main = pd.concat([df_main, df_local_sensiType])
C:\Users\dizri\Desktop\ISDA_SIMM-main\src\agg_margins.py:84: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
df_main = pd.concat([df_main, df_local_sensiType])
C:\Users\dizri\Desktop\ISDA_SIMM-main\src\agg_margins.py:90: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
df_risk_class = pd.concat([df_risk_class, df_local_riskType])
Traceback (most recent call last):
File "C:\Users\dizri\Desktop\ISDA_SIMM-main\src\main.py", line 14, in
main('USD')
File "C:\Users\dizri\Desktop\ISDA_SIMM-main\src\main.py", line 9, in main
results = calc.simm()
I face the following errors:
C:\Users\dizri\Desktop\ISDA_SIMM-main\src>python main.py
Traceback (most recent call last):
File "C:\Users\dizri\Desktop\ISDA_SIMM-main\src\main.py", line 2, in
import agg_margins
File "C:\Users\dizri\Desktop\ISDA_SIMM-main\src\agg_margins.py", line 7, in
from margin_risk_class import MarginByRiskClass
File "C:\Users\dizri\Desktop\ISDA_SIMM-main\src\margin_risk_class.py", line 3, in
from scipy.stats import norm
ModuleNotFoundError: No module named 'scipy'
Could you please help me?
Hello,
Thank you for making your SIMM python codes available on GitHub. Are you planning to update for version 2.5 that was released recently? Also, have you tried running the ISDA SIMM Unit tests on your model ?
Thanks again.
Hi ,
Thank you so much , I tried to validate the ISDA Unit Test (Its free) and I have find some test that doesn't pass the test using your code.
Exemple when crif file is :
portfolio_id,trade_id,collect_regulations,product_class,risk_type,qualifier,bucket,label1,label2,amount,amount_currency,amountusd
C330,C330.S_IRV_16,All,RatesFX,Risk_InflationVol,USD,,30y,,80000000.0,USD,80000000.0
C330,C330.S_IRV_21,All,RatesFX,Risk_InflationVol,USD,,2w,,-80000000.0,USD,-80000000.0
Official unit test expect the result to be 0 and your code return a Curvature of 2,442,463.46
An other failed test :
portfolio_id,trade_id,collect_regulations,product_class,risk_type,qualifier,bucket,label1,label2,amount,amount_currency,amountusd
C349,C349.S_FXV_7,All,RatesFX,Risk_FXVol,RUBTRY,,5y,,-12000000.0,USD,-12000000.0
C349,C349.S_FXV_7,All,RatesFX,Risk_FXVol,RUBTRY,,5y,,-12000000.0,USD,-12000000.0
C349,C349.S_FXV_7,All,RatesFX,Risk_FXVol,RUBTRY,,5y,,-12000000.0,USD,-12000000.0
C349,C349.S_FXV_7,All,RatesFX,Risk_FXVol,RUBTRY,,5y,,-12000000.0,USD,-12000000.0
C349,C349.S_FXV_7,All,RatesFX,Risk_FXVol,RUBTRY,,5y,,-12000000.0,USD,-12000000.0
C349,C349.S_FXV_7,All,RatesFX,Risk_FXVol,RUBTRY,,5y,,-12000000.0,USD,-12000000.0
C349,C349.S_FXV_7,All,RatesFX,Risk_FXVol,RUBTRY,,5y,,-12000000.0,USD,-12000000.0
C349,C349.S_FXV_7,All,RatesFX,Risk_FXVol,RUBTRY,,5y,,-12000000.0,USD,-12000000.0
C349,C349.S_FXV_7,All,RatesFX,Risk_FXVol,RUBTRY,,5y,,-12000000.0,USD,-12000000.0
C349,C349.S_FXV_7,All,RatesFX,Risk_FXVol,RUBTRY,,5y,,-12000000.0,USD,-12000000.0
Official unit test expect the result to be 1,898,530,683.542 and your return a Vega 1,706,855,277.77
If you have an idea to correct it and validate all unit test it will be really good. Thank you for all.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.