{"repo":"ryantcullen/stock-bot","free":true,"listed":false,"github":"https://github.com/ryantcullen/stock-bot","clone":"git clone https://github.com/ryantcullen/stock-bot.git","description":"An open-source Python backtesting engine for designing and evaluating daily stock trading algorithms against real historical market data.","language":"Python","stars":312,"topics":["finance","trading-algorithms","stock-market","quantitative-finance","open-source"],"license":"AGPL-3.0","category":"trading","readme_excerpt":"StockBot An open-source Python backtesting engine for designing and evaluating daily stock trading algorithms against real historical market data. Features - Fetches up to 10 years of historical price data via the Yahoo Finance API - Computes 10, 50, 100, and 200-day moving averages with derived indicators (slope, concavity, crossover detection) - Position sizing via the Kelly Criterion - Compares algorithm performance against a buy-and-hold baseline - Visualizes results with matplotlib (price chart, moving average overlays, buy/sell markers) Installation Usage Enter any stock ticker (e.g. AAPL , TSLA , IBM ) to run the backtest. Type exit or Ctrl+C to quit. Example Output Designing Your Own Algorithm All trading logic lives in the Decide() method of the Portfolio class. To implement your own strategy, modify three parameters based on the moving average data: The method receives four MovingAverage objects ( f1 through f4 ), each with attributes you can use to build your logic: Attribute Description ----------- ------------- percent difference How far the current price deviates from the moving average slope First derivative — momentum / direction of the trend avg slope Average slope over the window concavity Second derivative — whether the trend is accelerating or decelerating avg concavity Average concavity over the window above Whether the price is currently above the moving average flipped True on the day the price crosses over the moving average Architecture Class Responsi","default_branch":null,"files":null,"tree":[],"storefront":"/r/ryantcullen","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ryantcullen/stock-bot/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}