The span_calculator does not work as explained in the test folder. Using the following I am trying to get the margin requirement for selling a strangle for Nifty 50 at 21000 PE and 22300 CE for 1 lot. The span calculator gives the output as follows
{'request_time': '15:13:07 12-02-2024', 'stat': 'Ok', 'span': '273316.00', 'expo': '86359.80', 'span_trade': '273316.00', 'expo_trade': '86359.80'}.
There is no way the span margin is 2.73 lakh and the exposure margin is 86.4 K.
When I placed an order from the terminal, the margin blocked was ~1.25 lakh which seems correct. The span margin calculator is broken it seems or Maybe I am puttring wrong parameters.
The span_calculator does not work as explained in the test folder. Using the following I am trying to get the margin requirement for selling a strangle for Nifty 50 at 21000 PE and 22300 CE for 1 lot. The span calculator gives the output as follows {'request_time': '15:13:07 12-02-2024', 'stat': 'Ok', 'span': '273316.00', 'expo': '86359.80', 'span_trade': '273316.00', 'expo_trade': '86359.80'}. There is no way the span margin is 2.73 lakh and the exposure margin is 86.4 K. When I placed an order from the terminal, the margin blocked was ~1.25 lakh which seems correct. The span margin calculator is broken it seems or Maybe I am puttring wrong parameters.
Code: