Vindruee

Statistical approach to risk management - Python script

교육
Vindruee 업데이트됨   
CBOE:VIN   CBOE Near-term VIX Index
This 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/848701541766529034/carbon.png
TradingView does not allow posting external links until you've reached a specific reputation, so i can't use the url feature

Input explanation
  • WINRATE : chance of winning trade
  • AVGWIN : average earning per winning trade
  • AVGLOSS : average loss per losing trade

  • MAX_LEVERAGE : maximum leverage available to you

  • TRADES : how many trades per account you want to simulate
  • ACCOUNTS : how many accounts you want to simulate

    the inputs used in the source code are from one of my older strategies, change them to suit your algorithm

Source code
pastebin.com/69EKdVFC

Good luck, Have fun
-Vin
액티브 트레이드:
Left a mistake in the code, here's an updated version:

Preview:
cdn.discordapp.com/attachments/592684708551327764/849339593798582312/carbon.png

Source code:
pastebin.com/0Vst4uJW
면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.