refactor: enhance Optuna backtesting framework, optimize orderbook filtering, and update database management utilities.
This commit is contained in:
15
scratch/find_div_diff.py
Normal file
15
scratch/find_div_diff.py
Normal file
@@ -0,0 +1,15 @@
|
||||
with open('templates/backtest.html', 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
|
||||
count = 0
|
||||
for i, line in enumerate(lines):
|
||||
if i < 490: continue
|
||||
if i > 816: break
|
||||
|
||||
opens = line.count('<div')
|
||||
closes = line.count('</div')
|
||||
count += (opens - closes)
|
||||
if opens != closes:
|
||||
print(f"L{i+1} (net {opens-closes}, total {count}): {line.strip()}")
|
||||
|
||||
print(f"Final count: {count}")
|
||||
Reference in New Issue
Block a user