First let me introduce myself and then the algorithm and the problem I am facing. Hope I will get help from the forum.
Background
I am a graduate in Computer Science and have been working in data engineering in a company for 12 years. I also did trading using technical analysis for about the same time. Few years ago an idea struck in my mind: “Why not delegate this chart reading to a computer program ?” At the time I didn’t even know anything like Algorithmic Trading existed. May be because I am not from US and traded in my local exchange which is quite small. After trying many indicators and patterns and testing, my results were better than manual chart reading but not par to the level I wanted. After very long into this journey I found about “algorithmic trading” and then I knew what I have been doing for so long already had a name. Gradually I shifted from chart reading algorithm to pure mathematical and statistical algorithm.
I have been developing a trading algorithm and tuning it on real market movements of stocks. After each trade and tune, the algorithm got more robust and I started gaining but not from one or two excellent trades. On the contrary, I have seldom made more than 15% on each trade. I am consistently gaining on both long and short. I am currently getting data from Alpaca markets and work on the stocks in RUSSEL3000.
The algorithm
The algorithm mainly works on linear regression, time series forecast, volume analysis and stock/market cycles, all based on daily candles. It is not a high frequency trading. It might trade intraday or hold stock for about a week or two based on the stock's and whole market's movement. I will get into working detail of the 4 modules in the algorithm.
My Problem
I have no problem in the working of the algo as it is delivering. I am a non US citizen and based on South Asia. But recently I applied for US green card and got it. I am moving to US in a month or two. I do not want to work for data management but want to pursue my passion for algorithmic trading but I am unable to get into the crowd and show the output of my algo because of unorthodox method of working of my algo. I will list them below.
Background
I am a graduate in Computer Science and have been working in data engineering in a company for 12 years. I also did trading using technical analysis for about the same time. Few years ago an idea struck in my mind: “Why not delegate this chart reading to a computer program ?” At the time I didn’t even know anything like Algorithmic Trading existed. May be because I am not from US and traded in my local exchange which is quite small. After trying many indicators and patterns and testing, my results were better than manual chart reading but not par to the level I wanted. After very long into this journey I found about “algorithmic trading” and then I knew what I have been doing for so long already had a name. Gradually I shifted from chart reading algorithm to pure mathematical and statistical algorithm.
I have been developing a trading algorithm and tuning it on real market movements of stocks. After each trade and tune, the algorithm got more robust and I started gaining but not from one or two excellent trades. On the contrary, I have seldom made more than 15% on each trade. I am consistently gaining on both long and short. I am currently getting data from Alpaca markets and work on the stocks in RUSSEL3000.
The algorithm
The algorithm mainly works on linear regression, time series forecast, volume analysis and stock/market cycles, all based on daily candles. It is not a high frequency trading. It might trade intraday or hold stock for about a week or two based on the stock's and whole market's movement. I will get into working detail of the 4 modules in the algorithm.
- Reporting Module: Before the market begins this module prepares report based on latest data up to a year. The module then prepares each stock's cycle and records current position in the cycle. It also places the stocks in one of 4 buckets : Accumulating , Breaking-Out, Distributing or Breaking-Down. Former 2 are bullish stocks and later 2 are bearish stocks.
- Position Module: Now when the market begins, this module compares each stock's live movement with the current position in its cycle, taking in account the volume change in the current cycle. After calculating every stock's movement and statically summarising them, this module then prepares the position plan and gives two answers based on the summary. "Which side, long or short, has better chances ?" and "How much position should be in this side?"
- Selecting Module: This module will now select the stocks based on their position in their cycle (from step 1) and their current movement (from step 2) . After evaluating all stocks based on movement and volume, it sorts stocks according to highest return possibility.
- Trading Module: After getting information on the side, position amount and sorted stocks, it decides on how much of each stock to get in to position. It then checks quotes and decides on trading.
My Problem
I have no problem in the working of the algo as it is delivering. I am a non US citizen and based on South Asia. But recently I applied for US green card and got it. I am moving to US in a month or two. I do not want to work for data management but want to pursue my passion for algorithmic trading but I am unable to get into the crowd and show the output of my algo because of unorthodox method of working of my algo. I will list them below.
- Backtesting: The algo needs to calculate report for each stock in RUSSEL3000 (as in step 1 of the algorithm above) every day before market begins . And this report generation takes 2 hours in my local computer. I am not sure how to incorporate this in back test. Also algo compares every stock with every other stock every time new data arrives using un-closed daily bar. How do I backtest test this ?
- Programming Language: Since I already had skills in relational DB and NodeJS, I developed whose system in it. The industry seems to have python or C++ as default language. NodeJS works fine for my case. I am using a package named "simple statistics" for statistics and "tulip indicators" to calculate time series forecast. As the algo doesn't do high frequency trading but keeps position in the stock with favourable volatility and direction, the system is good enough for the algo. Although it is convertible to python or C++, I am unfamiliar with them and also I feel that rather than giving time to convert them its better to allocate the time improve the algo. But I am open to it.
Last edited: