question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VXX symbol is not tradable in paper trading mode

See original GitHub issue

Steps to reproduce

in pylivetrader shell execute the following

In [1]: symbol('VXX')
Out[1]: Asset(f39bb659-b994-4b94-b791-16e979ccddbe, symbol=VXX, asset_name=VXX, exchange=BATS)
In [2]: data.can_trade([symbol('VXX')])
Out[2]: 
Equity(f39bb659-b994-4b94-b791-16e979ccddbe [VXX])    False
dtype: bool

Expected result Active and tradable VXX is returned with sid=‘273b92cc-8a5d-459a-81bd-981d8ed5f89a’

Additional context If I hardcode the active one that I get trough alpaca_trade_api

my_symbol = 'VXX'
my_sid = [(asset.id, asset.status) for asset in alpaca_assets if asset.symbol == my_symbol]
my_sid
[('273b92cc-8a5d-459a-81bd-981d8ed5f89a', 'active'),
 ('f39bb659-b994-4b94-b791-16e979ccddbe', 'inactive')]

the order still executes for inactive symbol. Which then makes rebalancing in my algo impossible, as order_target_percent method that I use returns incorrect amount of VXX as its checking against active sid.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
shlomikushchicommented, Oct 21, 2020

Hi, did a fix in the alpaca-trade-api. you need to install that specific branch since it will take some time until it will be in the master branch. just remember to switch back once it does. do this: pip install git+https://github.com/alpacahq/alpaca-trade-api-python@avoid_changing_date_as_ints

1reaction
dsinyakovcommented, Oct 20, 2020

I missed last update. I will test this in next couple days starting today

Read more comments on GitHub >

github_iconTop Results From Across the Web

I see a "Non-tradable symbol" message when trying to trade
First, make sure, that you have selected the correct symbol. For trading with Oanda, please choose Oanda pairs in the search:.
Read more >
Modeling VXX
We propose a simple model for the VXX and derive an analytical expression for the VXX roll yield. The roll yield of any...
Read more >
How to Trade the VIX: 4 Ways Explained - Investopedia
VIX is the ticker symbol that refers to the Cboe Volatility Index.1 While often presented as an indicator of stock market volatility (and...
Read more >
Special Focus: Trading Volatility Products - Ticker Tape
No SPX options, no VIX. The VIX itself isn't really a tradable product. Well, that's not really true because you could theoretically buy...
Read more >
VXX: Investing (Short) In Volatility - Nasdaq
Many investors do not wish to trade in futures because of their ... In my forecasting model, the further away the current VIX...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found