introduce to tests

This commit is contained in:
2026-01-02 09:05:01 +01:00
parent 9eb1abcfc8
commit e37369608b
12 changed files with 2126 additions and 705 deletions

View File

@ -0,0 +1,25 @@
import os
import sys
# Add project root to path
current_dir = os.path.dirname(os.path.abspath(__file__))
project_root = os.path.dirname(os.path.dirname(current_dir))
sys.path.append(project_root)
from tests.backtest.backtester import Backtester
def main():
book_file = os.path.join(project_root, "market_data", "BNB_raw_20251230_book.csv")
trades_file = os.path.join(project_root, "market_data", "BNB_raw_20251230_trades.csv")
if not os.path.exists(book_file):
print(f"Error: Data file not found: {book_file}")
return
print(f"Starting Backtest on {book_file}...")
bt = Backtester(book_file, trades_file)
bt.run()
if __name__ == "__main__":
main()