- Replaced TrendDetectorSimple with a new Backtest class for improved backtesting functionality. - Integrated argparse for configuration file input, allowing dynamic parameter setting. - Added MarketFees and Supertrends classes to handle fee calculations and trend detection, respectively. - Removed deprecated main_debug.py and trend_detector_simple.py files to streamline the codebase. - Enhanced process_timeframe_data to utilize the new Backtest class for executing trades and calculating results. - Updated Storage class to support writing backtest results with metadata.
8 lines
202 B
Python
8 lines
202 B
Python
import pandas as pd
|
|
|
|
class MarketFees:
|
|
@staticmethod
|
|
def calculate_okx_taker_maker_fee(amount, is_maker=True):
|
|
fee_rate = 0.0008 if is_maker else 0.0010
|
|
return amount * fee_rate
|