Cortex Engine
- 3 Devlogs
- 9 Total hours
A backtesting engine and live charting dashboard.
A backtesting engine and live charting dashboard.
Hello :D.
Last devlog I migrated everythng to SQLite and built out a few technical indicators.
Devlog took this long as I was working on the backtesting engine for a while. Took a while to understand what was going on when I first tried to work on trade execution, create the cash vs holdings trackng, and the entry exit logic.
I did get a full simulation working that has slippage, comissions, and risk management like stop loss and take profit.
I’ve also added the strategy module to turn indicator outputs into buy and sell signals. 2 new indicators were also added:
main.py was also of course updated to handle the new modules.
Hello :D.
Last time, I had a script that pulled stock data from yfinance, flattened the dataframes, and saved the data to JSON and CSV files.
For this update, I migrated to an actual local database, created separate modules, and built out the first bit of the indicators.
I switched over to an SQLite database, and as everything was getting too crammed in the main.py, created separate modules for handling the database and fetching yfinance data, which include the DatabaseManager and DataFetcher classes.
I’ve started out on building indicators.py to compute technical indicators. So far I’ve implemented:
I also updated main.py to handle all the new modules and work with the SQLite database.
I will most likely start building out the strategy part to generate signals based on the indicator outputs.
Devlog 01
Hey guys :D. First devlog of Cortex, heres a quick overview:
Cortex is a backtesting and market analysis platform that I’m building to test algotrading strategies.
For this first update, I got the main data pipeline working. All my data is coming from yfinance. I setup yfinance to pull 2 years of daily OHLCV data for 6 tickers (AAPL, MSFT, GOOGL, NVDA, SPY, and AMZN). pandas returns MultiIndex columns, so I had to format everything into a flat table. The formatted JSON and CSV files are also exported.