added proper slippage to each trade
This commit is contained in:
parent
782493f418
commit
79727f3d7d
@ -33,10 +33,8 @@ class SharpeHyperOptLossDaily(IHyperOptLoss):
|
|||||||
|
|
||||||
Uses Sharpe Ratio calculation.
|
Uses Sharpe Ratio calculation.
|
||||||
"""
|
"""
|
||||||
total_profit = results.profit_percent
|
# get profit_percent and apply slippage of 0.1% per trade
|
||||||
|
results.loc[:, 'profit_percent'] = results['profit_percent'] - 0.0005
|
||||||
# adding slippage of 0.1% per trade
|
|
||||||
total_profit = total_profit - 0.0005
|
|
||||||
|
|
||||||
sum_daily = (
|
sum_daily = (
|
||||||
results.resample("D", on="close_time").agg(
|
results.resample("D", on="close_time").agg(
|
||||||
|
Loading…
Reference in New Issue
Block a user