Skip to content

Philipid3s/eth-trading-algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EthTradingAlgorithm

Backtesting a simple ETH moving-average strategy from OHLCV CSV data.

This project uses a lightweight Pandas-based backtest (no Zipline dependency), compatible with modern Python.

Dataset note: this repo uses historical ETH data from June 20, 2017 to June 19, 2018 (ETH-USD.csv).

Prerequisites

  • Python 3.10+
  • Install dependencies:
pip install -r requirements.txt

Run

python trading-algo.py --csv ETH-USD.csv --output result.png

Useful flags:

  • --no-plot to skip interactive display.
  • --fast-window and --slow-window to tune MA windows.
  • --capital-base to change starting capital.

Backtest Result (2017-2018 ETH Dataset)

Generated chart:

Backtest result

Latest run output on this dataset:

Final strategy value: 1,935.45
Final buy/hold value: 1,498.45
Signals generated: 9

Test Result

Run:

python -m unittest tests/test_smoke.py

Current smoke-test outcome:

.
----------------------------------------------------------------------
Ran 1 test in 1.853s

OK

About

Simple, modern ETH backtesting project using Pandas/Numpy: data prep, MA signals, portfolio simulation, and result visualization.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages