Statistical approach to risk management - Python scriptThis script can be used to approximate a strategy, and find optimal leverage.
The output will consist of two columns, one for the median account size at end of trading, and one for the share of accounts liquidated.
The script assumes a 100% position size for the account.
This does not take into account size deviations for earnings and losses, so use with a grain of salt if your positions vary greatly in that aspect.
Code preview
cdn.discordapp.com/attachments/592684708551327764/8487015417665
VEducation
