Skip to content

Commit

Permalink
This release adds in collect functions for the Performance and Risk s…
Browse files Browse the repository at this point in the history
…ections
  • Loading branch information
JerBouma committed Jun 30, 2024
1 parent 31d9b79 commit f8791d9
Show file tree
Hide file tree
Showing 16 changed files with 900 additions and 895 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "financetoolkit"
version = "1.9.1"
version = "1.9.2"
description = "Transparent and Efficient Financial Analysis"
license = "MIT"
authors = ["Jeroen Bouma"]
Expand Down
14 changes: 7 additions & 7 deletions tests/csv/test_toolkit_controller/test_toolkit_historical.csv
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ Date,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2010,12.0,28.0,126.0,12.0,28.0,126.0,11.0,28.0,125.0,12.0,28.0,126.0,10.0,22.0,98.0,193508000,24752000,91218900,0.0,1.0,2.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,-0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0
2011,14.0,26.0,126.0,15.0,26.0,126.0,14.0,26.0,126.0,14.0,26.0,126.0,12.0,21.0,100.0,179662000,27395700,95599000,0.0,1.0,3.0,0.0,-0.0,0.0,0.0,0.0,0.0,0.0,-0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0
2012,18.0,27.0,140.0,19.0,27.0,143.0,18.0,26.0,140.0,19.0,27.0,142.0,16.0,22.0,116.0,659492400,42749500,243935200,0.0,1.0,3.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,2.0,1.0,1.0
2013,20.0,37.0,184.0,20.0,38.0,185.0,20.0,37.0,184.0,20.0,37.0,185.0,18.0,31.0,154.0,223084400,17503500,86119900,0.0,1.0,3.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,2.0,1.0,2.0
2013,20.0,37.0,184.0,20.0,38.0,185.0,20.0,37.0,184.0,20.0,37.0,185.0,18.0,31.0,153.0,223084400,17503500,86119900,0.0,1.0,3.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,2.0,1.0,2.0
2014,28.0,47.0,208.0,28.0,47.0,208.0,28.0,46.0,205.0,28.0,46.0,206.0,25.0,40.0,174.0,165613600,21552500,130333800,0.0,1.0,4.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,3.0,2.0,2.0
2015,27.0,56.0,205.0,27.0,56.0,206.0,26.0,55.0,204.0,26.0,55.0,204.0,24.0,49.0,177.0,163649200,27334100,114877900,1.0,1.0,4.0,-0.0,0.0,0.0,0.0,0.0,0.0,-0.0,0.0,-0.0,0.0,0.0,0.0,2.0,2.0,2.0
2016,29.0,63.0,225.0,29.0,63.0,225.0,29.0,62.0,223.0,29.0,62.0,224.0,27.0,57.0,198.0,122345200,25579900,108998300,1.0,1.0,5.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,3.0,3.0,2.0
2017,43.0,86.0,269.0,43.0,86.0,269.0,42.0,86.0,267.0,42.0,86.0,267.0,40.0,80.0,241.0,103999600,18717400,96007400,1.0,2.0,5.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,4.0,4.0,2.0
2018,40.0,101.0,250.0,40.0,102.0,250.0,39.0,100.0,247.0,39.0,102.0,250.0,38.0,96.0,230.0,140014000,33173800,144299400,1.0,2.0,5.0,-0.0,0.0,-0.0,0.0,0.0,0.0,-0.0,0.0,-0.0,0.0,0.0,0.0,4.0,4.0,2.0
2019,72.0,157.0,321.0,73.0,158.0,322.0,72.0,156.0,320.0,73.0,158.0,322.0,71.0,151.0,301.0,100805600,18369400,57077300,1.0,2.0,6.0,1.0,1.0,0.0,0.0,0.0,0.0,1.0,1.0,0.0,0.0,0.0,0.0,7.0,7.0,3.0
2020,136.0,225.0,372.0,136.0,226.0,373.0,133.0,221.0,372.0,134.0,222.0,372.0,131.0,215.0,355.0,96452100,20272300,49455300,1.0,2.0,6.0,1.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,13.0,10.0,4.0
2015,27.0,56.0,205.0,27.0,56.0,206.0,26.0,55.0,204.0,26.0,55.0,204.0,24.0,49.0,176.0,163649200,27334100,114877900,1.0,1.0,4.0,-0.0,0.0,0.0,0.0,0.0,0.0,-0.0,0.0,-0.0,0.0,0.0,0.0,2.0,2.0,2.0
2016,29.0,63.0,225.0,29.0,63.0,225.0,29.0,62.0,223.0,29.0,62.0,224.0,27.0,57.0,197.0,122345200,25579900,108998300,1.0,1.0,5.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,3.0,3.0,2.0
2017,43.0,86.0,269.0,43.0,86.0,269.0,42.0,86.0,267.0,42.0,86.0,267.0,40.0,80.0,240.0,103999600,18717400,96007400,1.0,2.0,5.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,4.0,4.0,2.0
2018,40.0,101.0,250.0,40.0,102.0,250.0,39.0,100.0,247.0,39.0,102.0,250.0,38.0,96.0,229.0,140014000,33173800,144299400,1.0,2.0,5.0,-0.0,0.0,-0.0,0.0,0.0,0.0,-0.0,0.0,-0.0,0.0,0.0,0.0,4.0,4.0,2.0
2019,72.0,157.0,321.0,73.0,158.0,322.0,72.0,156.0,320.0,73.0,158.0,322.0,71.0,151.0,300.0,100805600,18369400,57077300,1.0,2.0,6.0,1.0,1.0,0.0,0.0,0.0,0.0,1.0,1.0,0.0,0.0,0.0,0.0,7.0,7.0,3.0
2020,136.0,225.0,372.0,136.0,226.0,373.0,133.0,221.0,372.0,134.0,222.0,372.0,131.0,215.0,354.0,96452100,20272300,49455300,1.0,2.0,6.0,1.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,13.0,10.0,4.0
428 changes: 214 additions & 214 deletions tests/csv/test_toolkit_controller/test_toolkit_technicals.csv

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,8 @@ Date,,Mkt-RF,SMB,HML,RMW,CMA
2023,HML,-0.05,0.41,1.0,0.22,0.62
2023,RMW,-0.34,-0.4,0.22,1.0,0.31
2023,CMA,-0.45,0.08,0.62,0.31,1.0
2024,Mkt-RF,1.0,0.28,-0.19,-0.27,-0.52
2024,SMB,0.28,1.0,0.38,-0.59,0.36
2024,HML,-0.19,0.38,1.0,0.09,0.47
2024,RMW,-0.27,-0.59,0.09,1.0,-0.09
2024,CMA,-0.52,0.36,0.47,-0.09,1.0
2024,Mkt-RF,1.0,0.27,-0.22,-0.28,-0.52
2024,SMB,0.27,1.0,0.38,-0.56,0.35
2024,HML,-0.22,0.38,1.0,0.07,0.56
2024,RMW,-0.28,-0.56,0.07,1.0,-0.11
2024,CMA,-0.52,0.35,0.56,-0.11,1.0
Original file line number Diff line number Diff line change
Expand Up @@ -3634,8 +3634,8 @@ Date,,Mkt-RF,SMB,HML,RMW,CMA
2024-01,HML,-0.11,0.03,1.0,0.42,0.53
2024-01,RMW,-0.35,-0.55,0.42,1.0,0.17
2024-01,CMA,-0.42,0.05,0.53,0.17,1.0
2024-02,Mkt-RF,1.0,0.22,-0.27,-0.27,-0.57
2024-02,SMB,0.22,1.0,0.41,-0.72,0.41
2024-02,Mkt-RF,1.0,0.23,-0.27,-0.27,-0.57
2024-02,SMB,0.23,1.0,0.41,-0.72,0.41
2024-02,HML,-0.27,0.41,1.0,0.01,0.37
2024-02,RMW,-0.27,-0.72,0.01,1.0,-0.23
2024-02,CMA,-0.57,0.41,0.37,-0.23,1.0
Expand All @@ -3644,3 +3644,8 @@ Date,,Mkt-RF,SMB,HML,RMW,CMA
2024-03,HML,-0.2,0.7,1.0,-0.2,0.55
2024-03,RMW,-0.17,-0.43,-0.2,1.0,-0.13
2024-03,CMA,-0.57,0.52,0.55,-0.13,1.0
2024-04,Mkt-RF,1.0,0.29,-0.3,-0.31,-0.56
2024-04,SMB,0.29,1.0,0.44,-0.34,0.36
2024-04,HML,-0.3,0.44,1.0,-0.02,0.79
2024-04,RMW,-0.31,-0.34,-0.02,1.0,-0.2
2024-04,CMA,-0.56,0.36,0.79,-0.2,1.0
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,5 @@ Date,,HML,Mkt-RF
2022,Mkt-RF,-0.56,1.0
2023,HML,1.0,-0.05
2023,Mkt-RF,-0.05,1.0
2024,HML,1.0,-0.19
2024,Mkt-RF,-0.19,1.0
2024,HML,1.0,-0.22
2024,Mkt-RF,-0.22,1.0
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,9 @@ Date,,Mkt-RF,SMB,HML,RMW,CMA,RF
2023,RMW,-0.34,-0.4,0.22,1.0,0.31,0.0
2023,CMA,-0.45,0.08,0.62,0.31,1.0,0.13
2023,RF,-0.01,0.06,0.22,0.0,0.13,1.0
2024,Mkt-RF,1.0,0.28,-0.19,-0.27,-0.52,-0.1
2024,SMB,0.28,1.0,0.38,-0.59,0.36,-0.12
2024,HML,-0.19,0.38,1.0,0.09,0.47,-0.1
2024,RMW,-0.27,-0.59,0.09,1.0,-0.09,0.04
2024,CMA,-0.52,0.36,0.47,-0.09,1.0,-0.02
2024,RF,-0.1,-0.12,-0.1,0.04,-0.02,1.0
2024,Mkt-RF,1.0,0.27,-0.22,-0.28,-0.52,-0.01
2024,SMB,0.27,1.0,0.38,-0.56,0.35,-0.1
2024,HML,-0.22,0.38,1.0,0.07,0.56,-0.08
2024,RMW,-0.28,-0.56,0.07,1.0,-0.11,0.01
2024,CMA,-0.52,0.35,0.56,-0.11,1.0,-0.02
2024,RF,-0.01,-0.1,-0.08,0.01,-0.02,1.0
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
1,3.535533905932738
2,2.1213203435596424
3,0.707106781186547
4,0.7071067811865458
4,0.707106781186546
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
,0
0,0.0
1,9.523809523809524
2,17.274788703360137
3,23.579196863055866
4,23.508794299660828
2,17.27478870336013
3,23.57919686305586
4,23.50879429966082
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
,MACD Line,Signal Line
0,0.0,0.0
1,-0.006060606060606057,-0.002020202020202019
2,0.003122130394857668,-0.0003060912151821233
3,0.0018810696496646927,0.00042296240643348196
4,-0.0034553313416323646,-0.0008698021762551336
1,-0.006060606060606058,-0.0020202020202020193
2,0.003122130394857668,-0.0003060912151821237
3,0.0018810696496646927,0.0004229624064334817
4,-0.0034553313416323655,-0.0008698021762551339
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
,0
0,0.01
1,-0.003223140495867768
2,0.013486100676183324
3,0.012655556314459396
4,0.0020944297148108373
2,0.013486100676183322
3,0.012655556314459394
4,0.0020944297148108356
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
,0
0,0.01
1,0.0027272727272727266
1,0.0027272727272727275
2,0.011322314049586777
3,0.011081893313298272
4,0.005430639983607676
Loading

0 comments on commit f8791d9

Please sign in to comment.