Add initial implementation of backtesting framework with CLI interface. Introduce core modules for data loading, trade management, performance metrics, and logging. Include Supertrend indicator calculations and slippage estimation. Update .gitignore to exclude logs and CSV files.
This commit is contained in:
10
intrabar.py
Normal file
10
intrabar.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from __future__ import annotations
|
||||
import pandas as pd
|
||||
|
||||
|
||||
def precompute_slices(df: pd.DataFrame) -> pd.DataFrame:
|
||||
return df # hook for future use
|
||||
|
||||
|
||||
def entry_slippage_row(price: float, qty: float, slippage_bps: float) -> float:
|
||||
return price + price * (slippage_bps / 1e4)
|
||||
Reference in New Issue
Block a user