开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Re: downlod historical SH data, Proshares Short S&P 500, before the split


 

SH before and after the reverse split are two different instruments. ProShares, for example, indicates the SH CUSIPs as 74347B425 (before) and 74349Y753 (after) and, consequently, IBKR changed the conid for the SH contracts as well:
  • from 236687911 for 20241106 and before
  • to now 738523410 for 20241107 and after

I am not sure what exactly your "Stock()" function does, but if it returns a contract with conid 236687911, that contract will now be rejected even for data requests for time frames when it was the correct contract. At this point (20241107 and after) only contracts for SH with conid 738523410 will work.

But those new contracts describe an instrument with 1/4th of the shares than before the reverse split. I guess that is why that contract reports prices from before 201107 at 4x the actual price for that day. And the volume is probably be reported at 1/4 of the actual volume.

闯ü谤驳别苍

?
reqHistoricalData:SH:20241113 00:00:00 US/Eastern:3:YEAR:_1_day:TRADES:true:false
?
On Tue, Nov 12, 2024 at 12:23 PM, <supis31@...> wrote:

Hi,
?
When I'm trying to download the close prices with endDate 2024-11-07 everything is fine:
?
? ? ticker = "SH"
? ? contract = Stock(ticker, 'SMART', 'USD', primaryExchange = 'ARCA')
? ? bars = ib.reqHistoricalData(contract, endDateTime='20241107 15:59:00 US/Eastern', durationStr='3 Y',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? barSizeSetting='1 day',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? whatToShow='TRADES',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? useRTH=True)
?
But when I change the date to 2024-11-06 i get this:

Error 162, reqId 24: Historical Market Data Service error message:Unknown contract, contract: Stock(symbol='SH', exchange='SMART', primaryExchange='ARCA', currency='USD')
?
It must have something to do with the recent reverse split ?

Join [email protected] to automatically receive all group messages.