Fix typos discovered by codespell

This commit is contained in:
Christian Clauss
2024-04-18 22:51:25 +02:00
parent 298f9b225d
commit 99b4767bf4
59 changed files with 93 additions and 93 deletions
+2 -2
View File
@@ -107,7 +107,7 @@ tc5 = BTContainer(data=[
trades=[BTrade(exit_reason=ExitType.ROI, open_tick=1, close_tick=3)]
)
# Test 6: Drops 3% / Recovers 6% Positive / Closes 1% positve, Stop-Loss triggers 2% Loss
# Test 6: Drops 3% / Recovers 6% Positive / Closes 1% positive, Stop-Loss triggers 2% Loss
# stop-loss: 2% ROI: 5%
tc6 = BTContainer(data=[
# D O H L C V EL XL ES Xs BT
@@ -121,7 +121,7 @@ tc6 = BTContainer(data=[
trades=[BTrade(exit_reason=ExitType.STOP_LOSS, open_tick=1, close_tick=2)]
)
# Test 7: 6% Positive / 1% Negative / Close 1% Positve, ROI Triggers 3% Gain
# Test 7: 6% Positive / 1% Negative / Close 1% Positive, ROI Triggers 3% Gain
# stop-loss: 2% ROI: 3%
tc7 = BTContainer(data=[
# D O H L C V EL XL ES Xs BT
@@ -87,9 +87,9 @@ def test_backtest_position_adjustment(default_conf, fee, mocker, testdatadir) ->
for _, t in results.iterrows():
ln = data_pair.loc[data_pair["date"] == t["open_date"]]
# Check open trade rate alignes to open rate
# Check open trade rate aligns to open rate
assert ln is not None
# check close trade rate alignes to close rate or is between high and low
# check close trade rate aligns to close rate or is between high and low
ln = data_pair.loc[data_pair["date"] == t["close_date"]]
assert (round(ln.iloc[0]["open"], 6) == round(t["close_rate"], 6) or
round(ln.iloc[0]["low"], 6) < round(
+1 -1
View File
@@ -152,7 +152,7 @@ def test_lookahead_helper_text_table_lookahead_analysis_instances(lookahead_conf
assert data[0][2].__contains__('too few trades')
assert len(data[0]) == 3
# now check for an error which occured after enough trades
# now check for an error which occurred after enough trades
analysis.total_signals = 12
analysis.false_entry_signals = 11
analysis.false_exit_signals = 10
+1 -1
View File
@@ -129,7 +129,7 @@ def test_generate_backtest_stats(default_conf, testdatadir, tmp_path):
assert strat_stats['backtest_start'] == min_date.strftime(DATETIME_PRINT_FORMAT)
assert strat_stats['backtest_end'] == max_date.strftime(DATETIME_PRINT_FORMAT)
assert strat_stats['total_trades'] == len(results['DefStrat']['results'])
# Above sample had no loosing trade
# Above sample had no losing trade
assert strat_stats['max_drawdown_account'] == 0.0
# Retry with losing trade