leongold / hades

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Table of Contents

Introduction


I'm a software architect with a passion for algorithmic trading. I have experience developing an arbitrage system in a proprietary trading firm, generating millions in annual profits.

I'm now developing my own, deep learning, intraday system. A prominent feature of the model is based on linear optimization. I am now at a point where I'm becoming satisfied with my algorithm and am ready to tackle logistics.

This repository consists of this README and a results analysis file generated by the aforementioned system. It is going to be periodically updated.

I do this first and foremost for sport as this is far and wide my favorite hobby. I intend to go live in the near future. I backtest against liquid S&P500 stocks, however I am generally undecided regarding asset and venue types.

I deem the system to be of low-medium frequency; I incoporate several time windows that range from 30 seconds to 30 minutes, and as you'll be able to read in the quantitiative analysis section, the system averages roughly 0.5 daily executions per symbol.

Audience


I'm primarily looking for business opportunities, however, if you're a trader/software professional that is interested in either quantitative or fundamental research, don't hesitate to reach out if you think you could contribute and might be interested in cooperation.

Quantitative Analysis


Backtesting is done by strictly simulating market orders across 16 stocks over a 5 7 month period. Positions are not held overnight.

EDIT: close to 3 additional months were added as off-sample data.

Although it is a narrow time frame, it is also quite diverse:

(S&P500 index, March through July)

S&P500 index, March through July

Daily performance

Each row represents percentage points accumulated across the 16 backtested stocks.

DATE                  DAILY PCT PTS WON     TOTAL PCT PTS WON     TOTAL POSITIONS N     
01-03-2019            0.36625706830947263   0.36625706830947263   2                     
04-03-2019            0.48387769574104056   0.8501347640505132    3                     
05-03-2019            0.0                   0.8501347640505132    3                     
06-03-2019            0.36157449256306823   1.2117092566135814    4                     
07-03-2019            0.0                   1.2117092566135814    4                     
08-03-2019            0.0                   1.2117092566135814    4                     
11-03-2019            0.0                   1.2117092566135814    4                     
12-03-2019            0.0                   1.2117092566135814    4                     
13-03-2019            0.0                   1.2117092566135814    4                     
14-03-2019            0.0                   1.2117092566135814    4                     
15-03-2019            1.1745056473767594    2.386214903990341     6                     
18-03-2019            0.0                   2.386214903990341     6                     
19-03-2019            0.0                   2.386214903990341     6                     
20-03-2019            0.7122885302907004    3.0985034342810414    9                     
21-03-2019            0.0251985732025444    3.123702007483586     11                    
22-03-2019            1.1212242922996147    4.2449262997832005    16                    
25-03-2019            0.9944602475569417    5.239386547340143     19                    
26-03-2019            0.0                   5.239386547340143     19                    
27-03-2019            0.0                   5.239386547340143     19                    
28-03-2019            0.0                   5.239386547340143     19                    
29-03-2019            0.0                   5.239386547340143     19                    
01-04-2019            1.0624890792207844    6.301875626560927     21                    
02-04-2019            0.13198416190057694   6.433859788461503     22                    
03-04-2019            0.0                   6.433859788461503     22                    
04-04-2019            0.0                   6.433859788461503     22                    
05-04-2019            0.0                   6.433859788461503     22                    
08-04-2019            0.0                   6.433859788461503     22                    
09-04-2019            0.0                   6.433859788461503     22                    
10-04-2019            0.0                   6.433859788461503     22                    
11-04-2019            0.0                   6.433859788461503     22                    
12-04-2019            3.6896755965199093    10.123535384981412    33                    
15-04-2019            -0.1157228822712588   10.007812502710154    34                    
16-04-2019            0.9317549725993007    10.939567475309454    37                    
17-04-2019            1.078763896740151     12.018331372049605    38                    
18-04-2019            2.6937046065121266    14.712035978561731    45                    
22-04-2019            0.0                   14.712035978561731    45                    
23-04-2019            0.9451754604805654    15.657211439042296    51                    
25-04-2019            1.8548915069613758    17.512102946003672    55                    
26-04-2019            0.5752386038846541    18.087341549888325    58                    
29-04-2019            0.8290077967810823    18.916349346669406    60                    
30-04-2019            0.8438546624254342    19.760204009094842    62                    
01-05-2019            0.0                   19.760204009094842    62                    
02-05-2019            0.5654405845605474    20.32564459365539     67                    
03-05-2019            -0.11376564277587928  20.211878950879512    68                    
06-05-2019            0.0                   20.211878950879512    68                    
07-05-2019            0.26948124859646205   20.481360199475976    69                    
08-05-2019            0.0                   20.481360199475976    69                    
09-05-2019            0.9155269513367331    21.39688715081271     72                    
10-05-2019            0.2739726027397364    21.670859753552445    73                    
13-05-2019            1.10278679110526      22.773646544657705    78                    
14-05-2019            0.0                   22.773646544657705    78                    
15-05-2019            0.0                   22.773646544657705    78                    
16-05-2019            0.0                   22.773646544657705    78                    
17-05-2019            -0.18795133049757418  22.585695214160133    79                    
20-05-2019            0.0                   22.585695214160133    79                    
21-05-2019            0.0                   22.585695214160133    79                    
22-05-2019            0.0                   22.585695214160133    79                    
23-05-2019            0.0                   22.585695214160133    79                    
24-05-2019            0.0                   22.585695214160133    79                    
28-05-2019            0.40705563093622793   22.99275084509636     80                    
29-05-2019            1.906302639346349     24.89905348444271     83                    
30-05-2019            0.0                   24.89905348444271     83                    
31-05-2019            0.0                   24.89905348444271     83                    
03-06-2019            8.21220497416987      33.11125845861258     103                   
04-06-2019            0.0                   33.11125845861258     103                   
05-06-2019            0.16317416695293518   33.27443262556552     104                   
06-06-2019            0.0                   33.27443262556552     104                   
07-06-2019            0.0                   33.27443262556552     104                   
10-06-2019            0.2881631446726661    33.56259577023818     105                   
11-06-2019            0.5978784956605637    34.16047426589875     106                   
12-06-2019            0.26294729621585      34.4234215621146      107                   
13-06-2019            0.0                   34.4234215621146      107                   
14-06-2019            0.0                   34.4234215621146      107                   
17-06-2019            0.0                   34.4234215621146      107                   
18-06-2019            -0.20726002250251335  34.21616153961209     108                   
19-06-2019            0.0                   34.21616153961209     108                   
20-06-2019            0.0                   34.21616153961209     108                   
21-06-2019            0.0                   34.21616153961209     108                   
24-06-2019            0.20895087224841188   34.425112411860496    109                   
25-06-2019            0.0                   34.425112411860496    109                   
26-06-2019            0.7063509129985154    35.13146332485901     111                   
27-06-2019            0.0                   35.13146332485901     111                   
28-06-2019            0.0                   35.13146332485901     111                   
01-07-2019            0.0                   35.13146332485901     111                   
02-07-2019            0.2903523822093162    35.421815707068326    112                   
03-07-2019            -0.12072354994385057  35.30109215712447     119                   
05-07-2019            0.0                   35.30109215712447     119                   
08-07-2019            0.0                   35.30109215712447     119                   
09-07-2019            0.0                   35.30109215712447     119                   
10-07-2019            0.0                   35.30109215712447     119                   
11-07-2019            0.0                   35.30109215712447     119                   
12-07-2019            0.5485544848035648    35.84964664192804     120                   
15-07-2019            0.0                   35.84964664192804     120                   
16-07-2019            0.24643548671008728   36.09608212863812     121                   
17-07-2019            0.0                   36.09608212863812     121                   
18-07-2019            0.0                   36.09608212863812     121                   
19-07-2019            0.0                   36.09608212863812     121                   
22-07-2019            0.0                   36.09608212863812     121                   
23-07-2019            1.140601112274178     37.2366832409123      124                   
24-07-2019            0.0                   37.2366832409123      124                   
25-07-2019            0.0                   37.2366832409123      124                   
26-07-2019            0.0                   37.2366832409123      124                   
29-07-2019            0.0                   37.2366832409123      124                   
30-07-2019            0.6331705171390545    37.869853758051356    129                   
31-07-2019            12.55915187133724     50.4290056293886      183

OFF SAMPLE:
01-08-2019            16.929663599665318    67.35866922905392     219                   
02-08-2019            2.2886828636016667    69.64735209265558     224                   
05-08-2019            0.0                   69.64735209265558     224                   
06-08-2019            -0.35423227449378086  69.2931198181618      226                   
07-08-2019            0.1765074213040512    69.46962723946585     230                   
08-08-2019            0.0                   69.46962723946585     230                   
09-08-2019            -0.11940892581719521  69.35021831364865     231                   
12-08-2019            -0.3363842631124302   69.01383405053622     233                   
13-08-2019            0.4663519147693307    69.48018596530555     242                   
14-08-2019            0.0                   69.48018596530555     242                   
15-08-2019            0.5027539694693179    69.98293993477488     244                   
16-08-2019            0.0                   69.98293993477488     244                   
19-08-2019            0.0                   69.98293993477488     244                   
20-08-2019            -0.23681277860326472  69.74612715617161     245                   
21-08-2019            0.0                   69.74612715617161     245                   
22-08-2019            0.0                   69.74612715617161     245                   
23-08-2019            9.198813076827065     78.94494023299868     277                   
26-08-2019            0.0                   78.94494023299868     277                   
27-08-2019            0.0                   78.94494023299868     277                   
28-08-2019            0.0                   78.94494023299868     277                   
29-08-2019            0.0                   78.94494023299868     277                   
30-08-2019            0.0                   78.94494023299868     277                   
03-09-2019            0.8049929637340522    79.74993319673273     279                   
04-09-2019            0.0                   79.74993319673273     279                   
05-09-2019            0.0                   79.74993319673273     279                   
06-09-2019            0.0                   79.74993319673273     279                   
09-09-2019            0.0                   79.74993319673273     279                   
10-09-2019            0.0                   79.74993319673273     279                   
11-09-2019            0.0                   79.74993319673273     279                   
12-09-2019            -0.17803890149998028  79.57189429523275     280                   
13-09-2019            0.0                   79.57189429523275     280                   
16-09-2019            0.0                   79.57189429523275     280                   
18-09-2019            -0.15274504669635278  79.4191492485364      281                   
19-09-2019            0.0                   79.4191492485364      281                   
20-09-2019            -0.10286347857765324  79.31628576995874     284                   
23-09-2019            0.0                   79.31628576995874     284                   
24-09-2019            0.21150278293135183   79.52778855289009     285                   
25-09-2019            0.37333333333333485   79.90112188622342     286                   
26-09-2019            0.6000091604451987    80.50113104666862     287                   
27-09-2019            -1.4426315392310805   79.05849950743753     292                   
30-09-2019            0.0                   79.05849950743753     292                   
01-10-2019            0.5841924398625488    79.64269194730008     293                   
02-10-2019            0.0                   79.64269194730008     293                   
03-10-2019            5.096464638185484     84.73915658548556     307                   
04-10-2019            0.0                   84.73915658548556     307                   
07-10-2019            0.0                   84.73915658548556     307                   
08-10-2019            0.0                   84.73915658548556     307                   
09-10-2019            0.0                   84.73915658548556     307                   
10-10-2019            0.0                   84.73915658548556     307                   
11-10-2019            0.0                   84.73915658548556     307                   
14-10-2019            0.0                   84.73915658548556     307                   
15-10-2019            0.0                   84.73915658548556     307                   
16-10-2019            0.0                   84.73915658548556     307                   
17-10-2019            0.0                   84.73915658548556     307                   
18-10-2019            0.0                   84.73915658548556     307                   
21-10-2019            0.0                   84.73915658548556     307                   
22-10-2019            1.8710529731944896    86.61020955868005     310                   
23-10-2019            0.0                   86.61020955868005     310                   
24-10-2019            1.2314339810030455    87.8416435396831      313                   
25-10-2019            0.0                   87.8416435396831      313

Summary

general data:
	start: 2019-03-01
	end: 2019-10-24
	traded symbols: 16
	traded days: 66
	profit: 87.842%
	number of executions: 626
	average daily number of executions: 9
	average daily number of executions per symbol: 0.593

winning positions:
	sum: 108.038%
	n: 204
	average: 0.53%

losing positions:
	sum: -20.197%
	n: 109
	average: -0.185%

symbol data:
	JNJ:
		profit: 9.265%
		exec_n: 23
		daily_n: 0.348
	FB:
		profit: 9.263%
		exec_n: 25
		daily_n: 0.379
	AAPL:
		profit: 8.605%
		exec_n: 26
		daily_n: 0.394
	BAC:
		profit: 7.042%
		exec_n: 16
		daily_n: 0.242
	MA:
		profit: 6.633%
		exec_n: 18
		daily_n: 0.273
	PG:
		profit: 5.513%
		exec_n: 19
		daily_n: 0.288
	MSFT:
		profit: 5.316%
		exec_n: 24
		daily_n: 0.364
	UNH:
		profit: 5.137%
		exec_n: 14
		daily_n: 0.212
	CVX:
		profit: 5.077%
		exec_n: 15
		daily_n: 0.227
	DIS:
		profit: 4.956%
		exec_n: 23
		daily_n: 0.348
	WMT:
		profit: 4.226%
		exec_n: 18
		daily_n: 0.273
	V:
		profit: 4.157%
		exec_n: 17
		daily_n: 0.258
	JPM:
		profit: 3.692%
		exec_n: 17
		daily_n: 0.258
	XOM:
		profit: 3.522%
		exec_n: 17
		daily_n: 0.258
	HD:
		profit: 2.805%
		exec_n: 34
		daily_n: 0.515
	AMZN:
		profit: 2.632%
		exec_n: 7
		daily_n: 0.106

Plots


Some example plots just to serve as rough visual reference.

Each plot's title consists of symbol, followed by date and percentage points won.

Please be advised that attempting to deduce entry/exit logic will be futile (in case you find yourself wondering why some entry points don't happen and/or why some exits are premature/late, etc).

Contact


I can be reached at leon dot otium at gmaill dot com.

About