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:
11
market_costs.py
Normal file
11
market_costs.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from __future__ import annotations
|
||||
|
||||
TAKER_FEE_BPS_DEFAULT = 10.0 # 0.10%
|
||||
|
||||
|
||||
def okx_fee(fee_bps: float, notional_usd: float) -> float:
|
||||
return notional_usd * (fee_bps / 1e4)
|
||||
|
||||
|
||||
def estimate_slippage_rate(slippage_bps: float, notional_usd: float) -> float:
|
||||
return notional_usd * (slippage_bps / 1e4)
|
||||
Reference in New Issue
Block a user