bugfixing

This commit is contained in:
MuslemRahimi 2025-01-24 14:03:45 +01:00
parent a0870a1baa
commit 808430fbc1
2 changed files with 1 additions and 16 deletions

View File

@ -124,7 +124,7 @@ def compute_realized_volatility(data, window_size=20):
"total_open_interest": data[i].get("total_open_interest", None), # Default to None if missing
"changesPercentageOI": data[i].get("changesPercentageOI", None), # Default to None if missing
"iv": data[i].get("iv", None), # Default to None if missing
"rv": round(realized_volatility[i], 4) if realized_volatility[i] is not None else None
"rv": round(realized_volatility[i], 2) if realized_volatility[i] is not None else None
})
except Exception as e:
# If any error occurs, append a dictionary with default values

View File

@ -1,15 +0,0 @@
Expiration Date,Total Call Volume,Total Put Volume,Total Volume
2025-01-24,2273.0,1846.0,4119.0
2025-01-31,460.0,830.0,1290.0
2025-02-07,117.0,193.0,310.0
2025-02-14,191.0,76.0,267.0
2025-02-21,637.0,340.0,977.0
2025-02-28,73.0,61.0,134.0
2025-03-21,516.0,189.0,705.0
2025-04-17,4838.0,185.0,5023.0
2025-06-20,535.0,1996.0,2531.0
2025-07-18,86.0,191.0,277.0
2025-09-19,478.0,388.0,866.0
2026-01-16,1458.0,2072.0,3530.0
2026-12-18,26.0,221.0,247.0
2027-01-15,71.0,439.0,510.0
1 Expiration Date Total Call Volume Total Put Volume Total Volume
2 2025-01-24 2273.0 1846.0 4119.0
3 2025-01-31 460.0 830.0 1290.0
4 2025-02-07 117.0 193.0 310.0
5 2025-02-14 191.0 76.0 267.0
6 2025-02-21 637.0 340.0 977.0
7 2025-02-28 73.0 61.0 134.0
8 2025-03-21 516.0 189.0 705.0
9 2025-04-17 4838.0 185.0 5023.0
10 2025-06-20 535.0 1996.0 2531.0
11 2025-07-18 86.0 191.0 277.0
12 2025-09-19 478.0 388.0 866.0
13 2026-01-16 1458.0 2072.0 3530.0
14 2026-12-18 26.0 221.0 247.0
15 2027-01-15 71.0 439.0 510.0