Ticker | UVXY |
From | 2021-05-26 00:00:00 |
Security Type | Equity |
Market | USA |
Resolution | Daily |
Status | Waiting Review |
UVXY data isn't adjusting to the recent split. I wanted to attach a notebook but it isn't loading. Code attached.
from QuantConnect.Data.Custom.CBOE import *
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
sns.set()
# QuantBook Analysis Tool
# For more information see [https://www.quantconnect.com/docs/research/overview]
qb = QuantBook()
uvxy = qb.AddEquity("UVXY")
vix = qb.AddData(CBOE, "VIX")
history = qb.History(qb.Securities.Keys, 360, Resolution.Daily)
# Indicator Analysis
rsi = qb.Indicator(RelativeStrengthIndex(14, MovingAverageType.Simple), uvxy.Symbol, 360, Resolution.Daily)
# Plot RSI
rsi['relativestrengthindex'].plot()
# Scale and plot UVXY close
uvxy_history = history.loc[uvxy.Symbol]
uvxy_close = uvxy_history['close']
scaled_uvxy = uvxy_close/uvxy_close[0]
scaled_uvxy.plot()
# Scale and plot VIX close
vix_history = history.loc[vix.Symbol]
vix_close = vix_history['close']
scaled_vix = vix_close/vix_close[0]
scaled_vix.plot()