├── AuthorProfile.jpg ├── GenerateHTML.py ├── LICENSE ├── LeanReportCreator.py ├── README.md ├── json └── sample.json └── outputs ├── Report.html ├── annual-returns.png ├── asset-allocation-all.png ├── asset-allocation-equity.png ├── crisis-2009q1.png ├── crisis-2009q2.png ├── crisis-9-11.png ├── crisis-aug07.png ├── crisis-dotcom.png ├── crisis-flash-crash.png ├── crisis-fukushima-melt-down-2011.png ├── crisis-gfc-crash.png ├── crisis-lehman-brothers.png ├── crisis-low-volatility-bull-market.png ├── crisis-mar08.png ├── crisis-recovery.png ├── crisis-sept08.png ├── crisis-us-downgrade-european-debt-crisis.png ├── crisis-us-housing-bubble-2003.png ├── cumulative-return.png ├── daily-returns.png ├── distribution-of-monthly-returns.png ├── drawdowns.png ├── leverage.png ├── monthly-returns.png ├── net-holdings.png ├── rolling-portfolio-beta-to-equity.png ├── rolling-sharpe-ratio(6-month).png └── strategy-statistics.json /AuthorProfile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QuantConnect/LeanReportCreator/98200b1a32f433d5398d58fbb96a59bcdbd73a8a/AuthorProfile.jpg -------------------------------------------------------------------------------- /GenerateHTML.py: -------------------------------------------------------------------------------- 1 | import base64 2 | import os 3 | import os.path 4 | import re 5 | import json 6 | 7 | def Base64(image): 8 | if not os.path.isfile(image) : 9 | return "" 10 | return 'data:image/png;base64,' + base64.b64encode(open(image, "rb").read()).decode('utf-8').replace('\n', '') 11 | 12 | def MethodGetTableHTML(title, ls): 13 | ret = ''' 14 |
''' + title + ''' | 18 ||
---|---|
''' + str(ls[0][0]) + ':' + ''' | 21 |''' + ("✔" if ls[0][1] == 1 else ("✖" if ls[0][1] == 0 else str(ls[0][1]))) + ''' |
''' + str(ls[1][0]) + ':' + ''' | 23 |''' + ("✔" if ls[1][1] == 1 else ("✖" if ls[1][1] == 0 else str(ls[1][1]))) + ''' |
''' + str(ls[2][0]) + ':' + ''' | 25 |''' + ("✔" if ls[2][1] == 1 else ("✖" if ls[2][1] == 0 else str(ls[2][1]))) + ''' |
''' + str(ls[3][0]) + ':' + ''' | 27 |''' + ("✔" if ls[3][1] == 1 else ("✖" if ls[3][1] == 0 else str(ls[3][1]))) + ''' |
''' + str(ls[4][0]) + ':' + ''' | 29 |''' + (str(ls[4][1]) if type(ls[4][1])!=list else ", ".join(ls[4][1])) + ''' |
''' + title + ''' | 44 |
---|
49 | ''' + (( ''' |
51 |
350 | Strategy Description 351 | | 352 |
---|
357 | ''' + strategyDescription + ''' 358 | 359 | |
360 |
369 | About the Author ''' + authorName + ''' 370 | | 371 |
---|
376 | |
380 |