You are browsing as a guest. Sign up (or log in) to start making projects!

Cortex Engine

  • 3 Devlogs
  • 9 Total hours

A backtesting engine and live charting dashboard.

Open comments for this post

5h 9m 7s logged

Devlog 03

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:

  • MACD (Moving Average Convergence Divergence)
  • Bollinger Bands

main.py was also of course updated to handle the new modules.

0
0
1
Open comments for this post

2h 57m 56s logged

Devlog 02

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:

  • SMA (Simple Moving Average)
  • EMA (Exponential Moving Average)
  • RSI (Relative Strength Index)

I also updated main.py to handle all the new modules and work with the SQLite database.

Whats next?

I will most likely start building out the strategy part to generate signals based on the indicator outputs.

0
0
5
Open comments for this post

1h 19m 37s logged

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.

1
0
44

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…