BitTA¶
Imports and Params¶
[1]:
from Ionomy import BitTA
from decouple import config
MARKET = 'btc-hive'
CURRENCY = 'hive'
BASE = 'btc'
TIME = 'day'
Instantiation¶
[2]:
bta = BitTA(config('TREX_KEY'), config('TREX_SECRET'))
Update the class ohlcv dataframe with the latest data¶
[3]:
bta.update(CURRENCY, BASE, TIME)
Momentum¶
Awesome Oscilator (AO)¶
[4]:
ao_series = bta.ao(fast=5, slow=34, offset=0)
ao_series.tail()
[4]:
26 -0.000005
27 -0.000005
28 -0.000006
29 -0.000006
30 -0.000007
Name: AO_5_34, dtype: float64
Absolute Price Oscillator (APO)¶
[6]:
apo_series = bta.apo(fast=12, slow=26, offset=0)
apo_series.tail()
[6]:
26 -0.000003
27 -0.000003
28 -0.000003
29 -0.000003
30 -0.000003
Name: APO_12_26, dtype: float64
Balance of Power (BOP)¶
[7]:
bop_series = bta.bop(offset=0)
bop_series.tail()
[7]:
26 -0.802281
27 -0.332075
28 -0.229630
29 -0.594203
30 -0.583333
Name: BOP, dtype: float64
Commodity Channel Index (CCI)¶
[8]:
cci_series = bta.cci(length=20, c=0.015, offset=0)
cci_series.tail()
[8]:
26 -76.387008
27 -77.379598
28 -75.407177
29 -85.992973
30 -97.848760
Name: CCI_20_0.015, dtype: float64
Center of Gravity (CG)¶
[9]:
cg_series = bta.cg(length=20, offset=0)
cg_series.tail()
[9]:
26 -12.041409
27 -12.148211
28 -12.138013
29 -11.565258
30 -11.332511
Name: CG_20, dtype: float64
Chande Momentum Oscillator (CMO)¶
[11]:
cmo_series = bta.cmo(length=14, drift=1, offset=0)
cmo_series.tail()
[11]:
26 -39.251391
27 -38.172458
28 -24.536601
29 -17.513736
30 -67.250355
Name: CMO_14, dtype: float64
Coppock Curve (COPC)¶
[12]:
coppock_series = bta.coppock(length=10, fast=11, slow=14, offset=0)
coppock_series.tail()
[12]:
26 -38.771187
27 -50.955977
28 -55.510796
29 -55.224571
30 -54.643435
Name: COPC_11_14_10, dtype: float64
Fisher Transform (FISHT)¶
[13]:
fisher_series = bta.fisher(length=5, offset=0)
fisher_series.tail()
[13]:
26 -4.306868
27 -4.709653
28 -6.155028
29 -6.877715
30 -7.239059
Name: FISHERT_5, dtype: float64
Know Sure Thing’ (KST)¶
[14]:
# Need more ohlcv data to get results
default_kwargs = {
"roc1": 10,
"roc2": 15,
"roc3": 20,
"roc4": 30,
"sma1": 10,
"sma1": 10,
"sma1": 10,
"sma1": 15,
"signal": 9,
"drift": 1,
"offset": 0
}
kst_series = bta.kst(**default_kwargs)
kst_series.tail()
[14]:
KST_10_15_20_30_15_10_10_15 | KSTS_9 | |
---|---|---|
26 | NaN | NaN |
27 | NaN | NaN |
28 | NaN | NaN |
29 | NaN | NaN |
30 | NaN | NaN |
Moving Average Convergence Divergence (MACD)¶
[15]:
macd_series = bta.macd(fast=12, slow=26, signal=9, offset=0)
macd_series.tail()
[15]:
MACD_12_26_9 | MACDH_12_26_9 | MACDS_12_26_9 | |
---|---|---|---|
26 | -0.000003 | -1.645118e-07 | -0.000002 |
27 | -0.000003 | -2.936861e-07 | -0.000002 |
28 | -0.000003 | -3.568946e-07 | -0.000003 |
29 | -0.000003 | -4.071771e-07 | -0.000003 |
30 | -0.000003 | -4.292012e-07 | -0.000003 |
Momentum (MOM)¶
[4]:
mom_series = bta.mom(length=12, offset=0)
mom_series.tail()
[4]:
26 -0.000007
27 -0.000004
28 -0.000013
29 -0.000015
30 -0.000012
Name: MOM_12, dtype: float64
Percentage Price Oscillator (PPO)¶
[5]:
ppo_series = bta.ppo(fast=12, slow=26, signal=9, offset=0)
ppo_series.tail()
[5]:
PPO_12_26_9 | PPOH_12_26_9 | PPOS_12_26_9 | |
---|---|---|---|
26 | -6.436170 | -11.002642 | 4.566472 |
27 | -8.523310 | -10.471825 | 1.948516 |
28 | -12.216228 | -11.331795 | -0.884433 |
29 | -16.248230 | -12.291037 | -3.957193 |
30 | -19.603026 | -12.516667 | -7.086359 |
Rate of Change (ROC)¶
[6]:
roc_series = bta.roc(length=1, offset=0)
roc_series.tail()
[6]:
26 -5.739935
27 -2.539683
28 -0.917975
29 -2.450687
30 1.041667
Name: ROC_1, dtype: float64
Relative Strength Index (RSI)¶
[7]:
rsi_series = bta.rsi(length=1, drift=1, offset=0)
rsi_series.tail()
[7]:
26 16.266019
27 10.589262
28 8.499405
29 4.158062
30 32.675188
Name: RSI_1, dtype: float64
Relative Vigor Index (RVI)¶
[8]:
rvi_series = bta.rvi(length=14, swma_length=4, offset=0)
rvi_series.tail()
[8]:
RVI_14_4 | RVIS_14_4 | |
---|---|---|
26 | -0.300914 | -0.282395 |
27 | -0.214800 | -0.303975 |
28 | -0.182882 | -0.260117 |
29 | -0.148107 | -0.205258 |
30 | -0.122529 | -0.166287 |
Slope¶
[11]:
slope_series = bta.slope(length=1, as_angle=False, to_degrees=False, offset=0)
slope_series.tail()
[11]:
26 -2.110000e-06
27 -8.800000e-07
28 -3.100000e-07
29 -8.200000e-07
30 3.400000e-07
Name: SLOPE_1, dtype: float64
Stochastic (STOCH)¶
[12]:
stoch_series = bta.stoch(fast_k=14, slow_k=5, slow_d=3, offset=0)
stoch_series.tail()
[12]:
STOCHF_14 | STOCHF_3 | STOCH_5 | STOCH_3 | |
---|---|---|---|---|
26 | 6.709265 | 22.935425 | 15.241707 | 14.207310 |
27 | 13.065977 | 17.236516 | 17.021569 | 15.752323 |
28 | 9.055627 | 9.610290 | 18.185576 | 16.816284 |
29 | 3.249097 | 8.456901 | 12.802855 | 16.003333 |
30 | 23.015873 | 11.773533 | 11.019168 | 14.002533 |
Trix (TRIX)¶
[13]:
trix_series = bta.trix(length=18, drift=1, offset=0)
trix_series.tail()
[13]:
26 -0.242958
27 -0.294361
28 -0.347659
29 -0.402758
30 -0.456325
Name: TRIX_18, dtype: float64
True Strength Index (TSI)¶
[14]:
tsi_series = bta.tsi(fast=13, slow=25, drift=1, offset=0)
tsi_series.tail()
[14]:
26 8.408619
27 7.977190
28 7.571647
29 7.105209
30 6.754438
Name: TSI_13_25, dtype: float64
Ultimate Oscillator (UO)¶
[15]:
uo_series = bta.uo(
fast=7,
medium=14,
slow=28,
fast_w=4.0,
medium_w=2.0,
slow_w=1.0,
drift=1,
offset=0,
)
uo_series.tail()
[15]:
26 NaN
27 32.055171
28 32.909266
29 34.102532
30 36.042116
Name: UO_7_14_28, dtype: float64
William’s Percent R (WILLR)¶
[17]:
willr_series = bta.willr(length=20, offset=0)
willr_series.tail()
[17]:
26 -90.027701
27 -98.949449
28 -99.271895
29 -99.804645
30 -97.614151
Name: WILLR_20, dtype: float64
Overlap¶
Double Exponential Moving Average (DEMA)¶
[18]:
dema_series = bta.dema(length=10, offset=0)
dema_series.tail()
[18]:
26 0.000036
27 0.000035
28 0.000034
29 0.000033
30 0.000033
Name: DEMA_10, dtype: float64
Exponential Moving Average (EMA)¶
[20]:
ema_series = bta.ema(length=10, offset=0)
ema_series.tail()
[20]:
26 0.000038
27 0.000038
28 0.000037
29 0.000036
30 0.000035
Name: EMA_10, dtype: float64
Fibonacci’s Weighted Moving Average (FWMA)¶
[21]:
fwma_series = bta.fwma(length=10, asc=True, offset=0)
fwma_series.tail()
[21]:
26 0.000036
27 0.000035
28 0.000035
29 0.000034
30 0.000033
Name: FWMA_10, dtype: float64
Hull Moving Average (HMA)¶
[22]:
hma_series = bta.hma(length=10, offset=0)
hma_series.tail()
[22]:
26 0.000035
27 0.000034
28 0.000034
29 0.000033
30 0.000032
Name: HMA_10, dtype: float64
Ichimoku Kinkō Hyō (ichimoku)¶
[24]:
ichimoku_pd_1, ichimoku_pd_2 = bta.ichimoku(tenkan=9, kijun=26, senkou=52, offset=0)
[25]:
ichimoku_pd_1.tail()
[25]:
ISA_9 | ISB_26 | ITS_9 | IKS_26 | ICS_26 | |
---|---|---|---|---|---|
26 | NaN | NaN | 0.000042 | 0.000072 | NaN |
27 | NaN | NaN | 0.000039 | 0.000072 | NaN |
28 | NaN | NaN | 0.000038 | 0.000072 | NaN |
29 | NaN | NaN | 0.000036 | 0.000072 | NaN |
30 | NaN | NaN | 0.000036 | 0.000072 | NaN |
[26]:
ichimoku_pd_2.tail()
[26]:
ISA_9 | ISB_26 | |
---|---|---|
52 | 0.000057 | NaN |
53 | 0.000055 | NaN |
54 | 0.000055 | NaN |
55 | 0.000054 | NaN |
56 | 0.000054 | NaN |
Kaufman’s Adaptive Moving Average (KAMA)¶
[4]:
kama_series = bta.kama(length=10, fast=2, slow=30, drift=1, offset=0)
kama_series.tail()
[4]:
26 0.000030
27 0.000031
28 0.000032
29 0.000032
30 0.000032
Name: KAMA_10_2_30, dtype: float64
Linear Regression Moving Average (linreg)¶
[5]:
linreg_series = bta.linreg(length=10, offset=0)
linreg_series.tail()
[5]:
26 0.000035
27 0.000034
28 0.000034
29 0.000034
30 0.000033
Name: LR_10, dtype: float64
Pascal’s Weighted Moving Average (PWMA)¶
[6]:
pwma_series = bta.pwma(length=10, asc=True, offset=0)
pwma_series.tail()
[6]:
26 0.000037
27 0.000037
28 0.000036
29 0.000036
30 0.000035
Name: PWMA_10, dtype: float64
wildeR’s Moving Average (RMA)¶
[7]:
rma_series = bta.rma(length=10, offset=0)
rma_series.tail()
[7]:
26 0.000041
27 0.000040
28 0.000040
29 0.000039
30 0.000038
Name: RMA_10, dtype: float64
Sine Weighted Moving Average (SINWMA)¶
[10]:
sinwma_series = bta.sinwma(length=10, offset=0)
sinwma_series.tail()
[10]:
26 0.000038
27 0.000037
28 0.000036
29 0.000036
30 0.000035
Name: SINWMA_10, dtype: float64
Simple Moving Average (SMA)¶
[9]:
sma_series = bta.sma(length=10, offset=0)
sma_series.tail()
[9]:
26 0.000038
27 0.000038
28 0.000037
29 0.000036
30 0.000035
Name: EMA_10, dtype: float64
Symmetric Weighted Moving Average (SWMA)¶
[11]:
swma_series = bta.swma(length=10, offset=0)
swma_series.tail()
[11]:
26 0.000037
27 0.000037
28 0.000036
29 0.000036
30 0.000035
Name: SWMA_10, dtype: float64
Tim Tillson’s T3 Moving Average (T3)¶
[12]:
t3_series = bta.t3(length=10, a=0.7, offset=0)
t3_series.tail()
[12]:
26 0.000041
27 0.000040
28 0.000039
29 0.000038
30 0.000037
Name: T3_10_0.7, dtype: float64
Triple Exponential Moving Average (TEMA)¶
[13]:
tema_series = bta.tema(length=10, offset=0)
tema_series.tail()
[13]:
26 0.000034
27 0.000033
28 0.000033
29 0.000032
30 0.000031
Name: TEMA_10, dtype: float64
Triangular Moving Average (TRIMA)¶
[14]:
trima_series = bta.trima(length=10, offset=0)
trima_series.tail()
[14]:
26 0.000039
27 0.000038
28 0.000037
29 0.000036
30 0.000035
Name: TRIMA_10, dtype: float64
Volume Weighted Average Price (VWAP)¶
[15]:
vwap_series = bta.vwap(offset=0)
vwap_series.tail()
[15]:
26 0.000068
27 0.000068
28 0.000068
29 0.000068
30 0.000068
Name: VWAP, dtype: float64
Volume Weighted Moving Average (VWMA)¶
[16]:
vwma_series = bta.vwma(length=10, offset=0)
vwma_series.tail()
[16]:
26 0.000040
27 0.000038
28 0.000037
29 0.000036
30 0.000035
Name: VWMA_10, dtype: float64
Weighted Moving Average (WMA)¶
[17]:
wma_series = bta.wma(length=10, asc=True, offset=0)
wma_series.tail()
[17]:
26 0.000037
27 0.000036
28 0.000035
29 0.000035
30 0.000034
Name: WMA_10, dtype: float64
Zero Lag Moving Average (ZLMA)¶
[19]:
zlma_series = bta.zlma(length=10, offset=0, mamode='ema')
zlma_series.tail()
[19]:
26 0.000035
27 0.000035
28 0.000034
29 0.000033
30 0.000032
Name: ZLEMA_10, dtype: float64
Log Return¶
[20]:
log_return_series = bta.log_return(length=10, cumulative=False, percent=False, offset=0)
log_return_series.tail()
[20]:
26 -0.289628
27 -0.344520
28 -0.294087
29 -0.258776
30 -0.175491
Name: LOGRET_10, dtype: float64
[21]:
percent_return_series = bta.percent_return(length=10, cumulative=False, percent=False, offset=0)
percent_return_series.tail()
[21]:
26 -0.251458
27 -0.291439
28 -0.254788
29 -0.228004
30 -0.160955
Name: PCTRET_10, dtype: float64
Trend Return¶
[29]:
# trend_return_series = bta.trend_return(trend="close", log=True, cumulative=False, offset=0, trend_reset=0)
# trend_return_series.tail()
Rolling Kurtosis¶
[30]:
kurtosis_series = bta.kurtosis(length=10, offset=0, mamode='ema')
kurtosis_series.tail()
[30]:
26 0.065587
27 1.024344
28 1.768071
29 -1.197006
30 -1.618680
Name: KURT_10, dtype: float64
Rolling Mean Absolute Deviation¶
[31]:
mad_series = bta.mad(length=10, offset=0)
mad_series.tail()
[31]:
26 0.000004
27 0.000003
28 0.000002
29 0.000002
30 0.000002
Name: MAD_10, dtype: float64
Rolling Median¶
[32]:
median_series = bta.median(length=10, offset=0)
median_series.tail()
[32]:
26 0.000037
27 0.000037
28 0.000037
29 0.000036
30 0.000035
Name: MEDIAN_10, dtype: float64
Rolling Quantile¶
[33]:
quantile_series = bta.quantile(length=30, q=0.5, offset=0)
quantile_series.tail()
[33]:
26 NaN
27 NaN
28 NaN
29 0.000037
30 0.000037
Name: QTL_30_0.5, dtype: float64
Rolling Skew¶
[34]:
skew_series = bta.skew(length=30, offset=0)
skew_series.tail()
[34]:
26 NaN
27 NaN
28 NaN
29 1.928790
30 2.001403
Name: SKEW_30, dtype: float64
Rolling Standard Deviation¶
[35]:
stdev_series = bta.stdev(length=30, offset=0)
stdev_series.tail()
[35]:
26 NaN
27 NaN
28 NaN
29 0.000021
30 0.000020
Name: STDEV_30, dtype: float64
Rolling Variance¶
[36]:
variance_series = bta.variance(length=30, offset=0)
variance_series.tail()
[36]:
26 NaN
27 NaN
28 NaN
29 4.263450e-10
30 4.121269e-10
Name: VAR_30, dtype: float64
Rolling Z Score¶
[37]:
zscore_series = bta.zscore(length=30, std=1, offset=0)
zscore_series.tail()
[37]:
26 NaN
27 NaN
28 NaN
29 -0.386298
30 -0.430835
Name: Z_30, dtype: float64
Trend¶
Average Directional Movement (ADX)¶
[38]:
adx_series = bta.adx(length=14, drift=1, offset=0)
adx_series.tail()
[38]:
ADX_14 | DMP_14 | DMN_14 | |
---|---|---|---|
26 | NaN | 43.174417 | 24.456502 |
27 | 33.907743 | 43.244219 | 26.401392 |
28 | 32.872561 | 44.458695 | 27.142852 |
29 | 31.783427 | 45.526168 | 28.934007 |
30 | 30.660034 | 46.291902 | 30.529761 |
Aroon (AROON)¶
[40]:
aroon_series = bta.aroon(length=1, offset=0)
aroon_series.tail()
[40]:
AROOND_1 | AROONU_1 | |
---|---|---|
26 | 100.0 | 100.0 |
27 | 100.0 | 100.0 |
28 | 100.0 | 100.0 |
29 | 100.0 | 100.0 |
30 | 100.0 | 100.0 |
Decreasing¶
[44]:
decreasing_series = bta.decreasing(length=1, asint=True, offset=0)
decreasing_series.tail()
[44]:
26 1
27 1
28 1
29 1
30 1
Name: DEC_1, dtype: int64
Detrend Price Oscillator (DPO)¶
[45]:
dpo_series = bta.dpo(length=1, centered=True, offset=0)
dpo_series.tail()
[45]:
26 8.800000e-07
27 3.100000e-07
28 8.200000e-07
29 3.200000e-07
30 NaN
Name: DPO_1, dtype: float64
Increasing¶
[46]:
increasing_series = bta.increasing(length=1, asint=True, offset=0)
increasing_series.tail()
[46]:
26 0
27 0
28 0
29 0
30 0
Name: INC_1, dtype: int64
Linear Decay¶
[47]:
linear_decay_series = bta.linear_decay(length=1, offset=0)
linear_decay_series.tail()
[47]:
26 0.000035
27 0.000034
28 0.000033
29 0.000033
30 0.000032
Name: LDECAY_1, dtype: float64
Q Stick¶
[48]:
qstick_series = bta.qstick(length=1, offset=0)
qstick_series.tail()
[48]:
26 -2.110000e-06
27 -8.800000e-07
28 -3.100000e-07
29 -8.200000e-07
30 -3.200000e-07
Name: QS_1, dtype: float64
Vortex¶
[49]:
vortex_series = bta.vortex(length=1, offset=0)
vortex_series.tail()
[49]:
VTXP_1 | VTXM_1 | |
---|---|---|
26 | 0.311787 | 1.433460 |
27 | 0.445283 | 1.547170 |
28 | 1.311111 | 1.651852 |
29 | 0.478261 | 1.500000 |
30 | 0.573333 | 1.346667 |
Acceleration Bands (ACCBANDS)¶
[52]:
vortex_series = bta.accbands(
length=10,
c=4,
drift=1,
mamode='ema',
offset=0
)
vortex_series.tail()
[52]:
ACCBL_10 | ACCBM_10 | ACCBU_10 | |
---|---|---|---|
26 | 0.000027 | 0.000039 | 0.000055 |
27 | 0.000027 | 0.000038 | 0.000052 |
28 | 0.000028 | 0.000037 | 0.000049 |
29 | 0.000028 | 0.000036 | 0.000047 |
30 | 0.000028 | 0.000036 | 0.000045 |
Average True Range (ATR)¶
[53]:
atr_series = bta.atr(length=1, mamode='ema', offset=0)
atr_series.tail()
[53]:
26 0.000003
27 0.000003
28 0.000001
29 0.000001
30 0.000002
Name: ATR_1, dtype: float64
Bollinger Bands (BBANDS)¶
[54]:
bbands_series = bta.bbands(length=20, std=2, mamode='ema', offset=0)
bbands_series.tail()
[54]:
BBL_20 | BBM_20 | BBU_20 | |
---|---|---|---|
26 | 6.995546e-07 | 0.000040 | 0.000079 |
27 | -2.899943e-07 | 0.000039 | 0.000079 |
28 | -2.216349e-07 | 0.000039 | 0.000077 |
29 | 1.852932e-05 | 0.000038 | 0.000058 |
30 | 2.409578e-05 | 0.000038 | 0.000051 |
Donchian Channels (DC)¶
[55]:
donchian_series = bta.donchian(lower_length=10, upper_length=20, offset=0)
donchian_series.tail()
[55]:
DCL_10_20 | DCM_10_20 | DCU_10_20 | |
---|---|---|---|
26 | 0.000035 | 0.000077 | 0.000118 |
27 | 0.000034 | 0.000076 | 0.000118 |
28 | 0.000033 | 0.000076 | 0.000118 |
29 | 0.000033 | 0.000053 | 0.000073 |
30 | 0.000032 | 0.000044 | 0.000056 |
Keltner Channels (KC)¶
[56]:
kc_series = bta.kc(length=20, scalar=2, mamode='ema', offset=0)
kc_series.tail()
[56]:
KCL_20 | KCB_20 | KCU_20 | |
---|---|---|---|
26 | 0.000027 | 0.000041 | 0.000055 |
27 | 0.000028 | 0.000040 | 0.000053 |
28 | 0.000028 | 0.000040 | 0.000051 |
29 | 0.000029 | 0.000039 | 0.000049 |
30 | 0.000029 | 0.000038 | 0.000048 |
Mass Index (MASSI)¶
[60]:
massi_series = bta.massi(fast=9, slow=25, offset=0)
massi_series.tail()
[60]:
26 NaN
27 NaN
28 NaN
29 NaN
30 NaN
Name: MASSI_9_25, dtype: float64
Normalized Average True Range (NATR)¶
[61]:
natr_series = bta.natr(length=20, mamode='ema', drift=1, offset=0)
natr_series.tail()
[61]:
26 24.382287
27 23.276758
28 21.531668
29 20.284296
30 18.905182
Name: NATR_20, dtype: float64
True Range¶
[62]:
true_range_series = bta.true_range(drift=1, offset=0)
true_range_series.tail()
[62]:
26 0.000003
27 0.000003
28 0.000001
29 0.000001
30 0.000002
Name: TRUERANGE_1, dtype: float64
Volume¶
Accumulation/Distribution (AD)¶
[63]:
ad_series = bta.ad(offset=0)
ad_series.tail()
[63]:
26 -10.025277
27 -13.443919
28 -17.399771
29 -21.928423
30 -23.634089
Name: AD, dtype: float64
Accumulation/Distribution Oscillator or Chaikin Oscillator¶
[64]:
adosc_series = bta.adosc(fast=12, slow=26, offset=0)
adosc_series.tail()
[64]:
26 -53.875972
27 -53.644655
28 -53.167654
29 -52.549297
30 -51.602041
Name: ADOSC_12_26, dtype: float64
Chaikin Money Flow (CMF)¶
[65]:
cmf_series = bta.cmf(length=20, offset=0)
cmf_series.tail()
[65]:
26 -0.024778
27 -0.164204
28 -0.215310
29 -0.625480
30 -0.483050
Name: CMF_20, dtype: float64
Elder’s Force Index (EFI)¶
[66]:
efi_series = bta.efi(length=13, drift=1, mamode='ema', offset=0)
efi_series.tail()
[66]:
26 0.000105
27 0.000088
28 0.000075
29 0.000064
30 0.000054
Name: EFI_13, dtype: float64
Ease of Movement (EOM)¶
[67]:
eom_series = bta.eom(length=14, drift=1, offset=0)
eom_series.tail()
[67]:
26 -0.000038
27 -0.000036
28 -0.000031
29 -0.000025
30 -0.000029
Name: EOM_14_100000000, dtype: float64
Money Flow Index (MFI)¶
[68]:
mfi_series = bta.mfi(length=14, drift=1, offset=0)
mfi_series.tail()
[68]:
26 45.056603
27 48.168097
28 54.635662
29 58.310922
30 46.966315
Name: MFI_14, dtype: float64
Negative Volume Index (NVI)¶
[69]:
nvi_series = bta.nvi(length=13, initial=1_000, offset=0)
nvi_series.tail()
[69]:
26 1447.481869
27 1429.308862
28 1417.968110
29 1388.480099
30 1356.293779
Name: NVI_13, dtype: float64
On Balance Volume (OBV)¶
[70]:
obv_series = bta.obv(offset=0)
obv_series.tail()
[70]:
26 400.875
27 386.495
28 379.735
29 373.608
30 368.491
Name: OBV, dtype: float64
Positive Volume Index (PVI)¶
[71]:
pvi_series = bta.pvi(length=13, initial=1_000, offset=0)
pvi_series.tail()
[71]:
26 1247.036814
27 1247.036814
28 1247.036814
29 1247.036814
30 1247.036814
Name: PVI_13, dtype: float64
Price-Volume (PVOL)¶
[72]:
pvol_series = bta.pvol(offset=0)
pvol_series.tail()
[72]:
26 0.000650
27 0.000486
28 0.000226
29 0.000200
30 0.000165
Name: PVOL, dtype: float64
Price-Volume Trend (PVT)¶
[73]:
pvt_series = bta.pvt(drift=1, offset=0)
pvt_series.tail()
[73]:
26 60957.106450
27 60920.585815
28 60914.380307
29 60899.364945
30 60894.348279
Name: PVT, dtype: float64
Volume Profile (VP)¶
[74]:
vp_series = bta.vp(width=10)
vp_series.tail()
[74]:
low_close | mean_close | high_close | pos_volume | neg_volume | total_volume | |
---|---|---|---|---|---|---|
5 | 0.000045 | 0.000046 | 0.000048 | 174.200 | 44.120 | 218.320 |
6 | 0.000037 | 0.000039 | 0.000042 | 8.082 | 27.090 | 35.172 |
7 | 0.000035 | 0.000036 | 0.000037 | 63.750 | 0.000 | 63.750 |
8 | 0.000034 | 0.000035 | 0.000037 | 18.770 | 22.503 | 41.273 |
9 | 0.000032 | 0.000033 | 0.000033 | 0.000 | 18.004 | 18.004 |
[ ]: