Mariner Backtesting - Register Whisper Data

Register Extra Data Sources - Whisper / Insight data

To access Live or siimulated live Whisper event data you will use register_extra_data_sources()

To get historical alerts you can use the Liberator call for Insight data

Overview:

In the Example Code below, we register for two tickers and give the callbacks two different names.

Note the convention on the names of the Tickers, all lower case, all spaces replaced with underscore.

CloudQuant will then give us callbacks at the times those Tickers would have fired.

Live and Forward

Only a very small number of Tickers are available to models/scripts in Live and Forward Testing, they are added on an as-needed basis. There is also a different way of accessing the data.

Example Code
 from cloudquant.interfaces import Strategy

class NewsTest(Strategy):

    @classmethod
    def is_symbol_qualified(cls, symbol, md, service, account): 
        return symbol=="BYND"

    @classmethod
    def register_extra_data_sources(cls, md, service, account):
        insight1 = '!insight/steam_train_up'
        insight2 = '!insight/double_bottom_ak'
        return {insight1: 'insight_callback_1', insight2: 'insight_callback_2'}

    def insight_callback_1(self, event, md, order, service, account):
        print service.time_to_string(event.timestamp),"Steam Train Up", event

    def insight_callback_2(self, event, md, order, service, account):
        print service.time_to_string(event.timestamp), "Double Bottom ak", event
Example Output when run on 2020/01/27 and 2020/01/28 (Selection)
 2020-01-27 09:30:22.120000 Steam Train Up UserEvent(timestamp=1580135422120000.0, symbol=u'BYND', field={'ExchangeId': 45, 'Short': 'BYND', 'Last': 121.38, 'AutoId': 16528893, 'Symbol': 'BYND', 'CreationTime': 1580135422120000.0, 'AvgVol': 20730000, 'GroupId': 0})
2020-01-27 09:30:22.490000 Steam Train Up UserEvent(timestamp=1580135422490000.0, symbol=u'BYND', field={'ExchangeId': 45, 'Short': 'BYND', 'Last': 121.44, 'AutoId': 16530393, 'Symbol': 'BYND', 'CreationTime': 1580135422490000.0, 'AvgVol': 20730000, 'GroupId': 0})
2020-01-27 09:30:22.700000 Steam Train Up UserEvent(timestamp=1580135422700000.0, symbol=u'BYND', field={'ExchangeId': 45, 'Short': 'BYND', 'Last': 121.5, 'AutoId': 16531174, 'Symbol': 'BYND', 'CreationTime': 1580135422700000.0, 'AvgVol': 20730000, 'GroupId': 0})
2020-01-27 09:30:23.030000 Steam Train Up UserEvent(timestamp=1580135423030000.0, symbol=u'BYND', field={'ExchangeId': 45, 'Short': 'BYND', 'Last': 121.5, 'AutoId': 16532230, 'Symbol': 'BYND', 'CreationTime': 1580135423030000.0, 'AvgVol': 20730000, 'GroupId': 0})
2

2020-01-28 10:18:08.230000 Double Bottom ak UserEvent(timestamp=1580224688230000.0, symbol=u'BYND', field={'ExchangeId': 45, 'Short': 'BYND', 'Last': 120.75, 'RVol': 2.0, 'AutoId': 18267358, 'Symbol': 'BYND', 'CreationTime': 1580224688230000.0, 'AvgVol': 20320000, 'GroupId': 0})
2020-01-28 10:18:08.670000 Double Bottom ak UserEvent(timestamp=1580224688670000.0, symbol=u'BYND', field={'ExchangeId': 45, 'Short': 'BYND', 'Last': 120.73, 'RVol': 2.0, 'AutoId': 18267422, 'Symbol': 'BYND', 'CreationTime': 1580224688670000.0, 'AvgVol': 20320000, 'GroupId': 0})
2020-01-28 10:18:09.950000 Double Bottom ak UserEvent(timestamp=1580224689950000.0, symbol=u'BYND', field={'ExchangeId': 45, 'Short': 'BYND', 'Last': 120.75, 'RVol': 2.0, 'AutoId': 18267565, 'Symbol': 'BYND', 'CreationTime': 1580224689950000.0, 'AvgVol': 20320000, 'GroupId': 0})
Returns

The data you receive back varies depending on the Whisper/Insight Ticker chosen but normally includes...

 event.field['ExchangeId']
event.field['Short']
event.field['Last']
event.field['AutoId']
event.field['Symbol']
event.field['CreationTime']
event.field['AvgVol']
event.field['GroupId'] # Always 0

Note that this data is from the Insight machines which are not currently maintained, so consume the data with level of skepticism. Use CQ data wherever possible.

Ticker Names

Listed are the 496 publicly available Tickers as of Early Feb 2020. Tickers may not be available on all dates.

 1 Min Reversal Dn
1 Min Reversal Up
1 Min Spike DnATR Th
1 Min Spike UpATR Th
1 Min Thin Mover U
1 Minute Spike DnATR
1 Minute Spike Up
1 Minute Spike UpATR
10 Min Spike Dn Low
10 Min Spike Up High
10 Minute Spike Dn1
10 Minute Spike Up1
20% Move Plus Thin
20% Move Today Thin
3 min Cons Strength
3 min Cons Weak
3 Min Volume Dn
3 Min Volume Up
3 Run Dn 1m
3 Run Dn 1m NRO
3 Run Dn 3m
3 Run Dn Stack 1mS
3 Run Dn Stack 3m
3 Run Dn Stack 3mS
3 Run Dn Stack10 3m
3 Run Dn Stack10S 3M
3 Run Up 1m
3 Run Up 3m
3 Run Up Stack 1mS
3 Run Up Stack 3m
3 Run Up Stack 3mS
3 Run Up Stack10 3m
3 Run UP Stack10S 3M
3 RunDn Stack10S 3M5
3 RunUp Stack10S 3M5
5 Green Bars
5 Min Move 7pct
5 Min Move 7pct1
5 Red Bars
5% Range
6 Min Spike
Adj Volume New Qual
Amex Cross Down
Amex Cross Up
Amex Imbalance BuyTh
Amex Imbalance SelTh
Arca Imbalance BuyTh
ARCA Imbalance SelTh
Arca Inet Cross Dn
Arca Inet Cross Up
Ask Crash 2% Thin
Ask Crash 2% Vol
Ask Drop Thin
Ask On Half High
Ask On Half High 15
AskChg GapDn
ATR 100 2mDn
ATR 100 2mUp
AwayFromClrPrc Down
AwayFromClrPrc DownE
AwayFromClrPrc DownG
AwayFromClrPrc Up
AwayFromClrPrc UpE
AwayFromClrPrc UpG
AwayFromClrPrc UpR1
Bang Bang
Bang Bang NG
BearTrap
Bid Ask 2% Move
Bid Jump Thin
Bid On Half Low
Bid On Half Low 15
Bid Spike 2%
Bid Spike 2% Thin
Bid Spike 2% Vol
BidChg GapUp
Big Adjustment test
Big Bid
Big Bully Reverse
Big Bully Reverse1
Big Bully Reverse2
Big Bully Reverse4
Big Cross Down
Big Green Daily Bar1
Big Inside Bid
Big Inside Bid MoveT
Big Inside Offer
Big Inside Offer Mov
Big Offer
Big Print
Big Print no ETF
Big Spread Thin
Big ThrowUp Reverse1
Big ThrowUp Reverse4
Bone Fish
Boom Boom
Boom Boom NG
Breakdance High
Breakdance Low
Bursting High
Bursting Low
Buy HiVol OTCOpn05
Buy HiVol OTCOpn25
Buy OImb Sim 5PCT
Buy OImb Sim AK
Buy OImb Sim AK1
Buy OImb Sim AR
Buy OImb Sim MGMO
Buy OImb Sim MGMO1
Close Imb Spike
Closing Print 35 B
Continuing High
Continuing Low
CrazyVol Hi Thin
CrazyVol Low Thin
Cross Big Up
Cross Down
Cross Down Big
Cross Lvl1 Dn
Cross Lvl1 Dn Thin
Cross Lvl1 Dn1
Cross Lvl1 Dn2
Cross Lvl1 Up Thin
Cross Lvl1 Up1
Cross Lvl1 Up2
Cross Up
Cross Up Big
DeltaLast Dn Spy
DeltaLast DnT
DeltaLast Up Spy
Double ATR Pref
Double Bottom
Double Bottom AK
Double Top
Double Top AK
Drop 3%
Drop Big Size
ECN Inside Spec DN
ECN Inside Spec Up
ECNCross Dn CC
ECNCross Up CC
Ern Scalp Dn
Ern Scalp Up
ETF 3% Gap
ETF 3% Gap New
ETF BidAsk 30DHL
ETF Minute Vol Spike
ETF Move 25 cents
ETF Move 50 cents
ETF MVol Spike Thin
ETF Spike Dn25c
ETF Spike Up25c
ETF Vol Breakout
Exhausted Buyer
Exhausted Seller
Eyes High NewHi
Eyes High Turn
Eyes Low NewLo
Eyes Low Turn
F Print Above Ask
F Print Below Bid
F Print Out Dn Thn2
F Print Out Up Thn2
F Print Outside Dn2
F Print Outside Up2
F Print Spike Dn
F Print Spike Dn 2x1
F Print Spike Dn ETF
F Print Spike Dn T
F Print Spike Up
F Print Spike Up 2x1
F Print Spike Up T
F Spike DnB Stack
F Spike DNB Stack10S
F Spike DNB Stack30M
F Spike DNB Stack30S
F Spike DNB Stack3Bs
F Spike DNB Stack93
F Spike DNB Stack93A
F Spike DNB Stack93B
F Spike DnB StackM
F Spike UpB Stack
F Spike UPB Stack10S
F Spike UPB Stack30M
F Spike UPB Stack30S
F Spike UPB Stack3BS
F Spike UPB Stack93A
F Spike UPB Stack93B
F Spike UPB Stack93S
F Spike UpB StackM
F Spk Dn L2
F Spk Up L2
Filling Gap Down
Filling Gap Up
FPrint SpikeDn ETF T
FPrint SpikeUp ETF T
Freight Train Dn
Freight Train Up
FSpike DNB Stack3BEs
FSpike UPB Stack3BES
Gap Bid Ask 50
Gap To High Thin
Gap To Low Thin
Green Bars NewHi
HeroD
HeroU
High Dollar SpikeDn
High Dollar SpikeUp
Imb Flip 10pct
Imb Open Flip Thin
Imbalance_Arca
Imbalance_Cts
Imbalance_Nyse
Imbalance_TotalView
Indic
Indic Chg
Indic New
Indication Buy
Indication G
Indication Sell
Indication Thin
Indicative Arca U
Jump Print 25 Thin
KT Money MakerDn
KT Money MakerDnNRP
KT Money MakerUp
KT Money MakerUpNRP
KT Post Mkt Cross Dn
KT Post Mkt Cross Up
KT Pre Mkt Gap Dn
KT Pre Mkt Gap Up
Large Move Dn1
Large Move Up1
Leap Big Size
Lifted Offer
LittleVol Bigsz
LP Down
LP Up
Major Money MakerDn
Major Money MakerUp
Min Dn 4% ExFormT
Min Move Dn 150ATR
Min Move Up 150ATR
Min Up 4% ExFormT
Min Vol Spike Thin
Minute Big Spike
Minute Big Spike TBP
Minute Big Spike Thn
Minute Move Dn 1%
Minute Move Dn 1%AR
Minute Move Dn 2%
Minute Move Dn 2%1
Minute Move Dn 4%
Minute Move Dn 5%
Minute Move Dn Var T
Minute Move Dn Var%
Minute Move Up 1%
Minute Move Up 1%AR
Minute Move Up 2%
Minute Move Up 2%1
Minute Move Up 4%
Minute Move Up 5%
Minute Move Up Var T
Minute Move Up Var%
Minute Vol Spike
Mo Money Maker
Mo Money Maker 2030
Mo Money Maker 2030T
Mo Money MakerDn
Mo Money MakerUp
Mo MoneyMakerDn Thin
Mo MoneyMakerUp Thin
MO Post Mkt Cross Dn
MO Post Mkt Cross Up
NAS Outside Lvl1
Nasdaq Flush Dn
Nasdaq Flush Dn 30
Nasdaq Flush Dn 30T
Nasdaq Flush Up
Nasdaq Flush Up 30
Nasdaq Flush Up 30T
NEW 1 DAY HIGH
NEW 1 DAY LOW
NEW HIGH
NEW LOW
New NYS Hi Spread
New NYS Lo Spread
NewHighs
NewLows
Nose Dive 5
Nose Dive Up 5
One Min Thin Mover D
One Min Thin Mover U
One Minute Mover Ask
One Minute Mover Bid
One Minute Mover Dn
One Minute Mover Up
Open Gap Dn
Open Gap Up
Open Imb Spike
OTC Ask Spike Dn1
OTC Drop
OTC Imb Movers Dn
OTC Imb Movers Up
OTC Print Outside
OTCOutside
OTCOutside1
Out of Range Dn
Out of Range Up
P p Trade Long
P p Trade Short
PM OA Cross Dn
PM OA Cross Up
Poppin Tags Lng
Poppin Tags Shrt
Post Market Gap Dn
Post Market Gap Up
Post Mkt Cross Buck
Pre Market CrDNL Sm3
Pre Market Cross DNL
Pre Market Cross DNP
Pre Market Cross UPL
Pre Market Cross UPP
Pre Market CrUPL Sm3
Pre Market Gap Dn
Pre Market Gap Dn CO
Pre Market Gap Dn1
Pre Market Gap DnETF
Pre Market Gap DnOTC
Pre Market Gap Up
Pre Market Gap Up CO
Pre Market Gap Up1
Pre Market Gap UpETF
Pre Market Gap UpOTC
Pre Market GapDn CO1
Pre Market GapDn COT
Pre Market GapDn Imb
Pre Market GapDn Thn
Pre Market GapUp CO1
Pre Market GapUp COT
Pre Market GapUp Imb
Pre Market GapUp Thn
Pre Mkt Cross Buck
Pre Mkt Cross Buck 1
Pre Mkt CrssBuck Ask
Pre Mkt CrssBuck Bid
pre mkt flasher
Pre Mkt Rev DnUp
Pre Mkt Rev UpDn
Pre Post Cross Prt2
Pre Post Cross PrtDn
Pre Post Cross PrtUp
Pre Post CrossPrtDn2
Pre Post CrossPrtUp2
Pref Big Bid Ask
Preferred Spike
PreMkt Buy 20k
PreMkt Dn BuyImb
PreMkt Dn BuyImb1
PreMkt Sell 20k
PreMkt Up SellImb
PreMkt Up SellImb1
PrePost Market Gap
PrePost OTC Cross Dn
PrePost OTC Cross Up
PrePost OTC Dn 25c
PrePost OTC Up 25c
PrePost Ticker
Price Spike Dn Thin
Price Spike Large
Price Spike Up Thin
Price Spike_DN
Price Spike_UP
Print Above Ask
Print Above LRP
Print Below Bid
Print Move 2%
Print Move 2% Thin
Print Move 2%1
Print Outside Spc 35
Printing Away
Printing Away ASE
Printing Away ETF
Printing Away Post
Printing Away Pre
Printing Away Spike
Purple City 10
Purple City1
Range Breakout
Really Big Cross
Red bars NewLo
Reverse 5M DNUP
Reverse 5M DNUP_S
Reverse 5M UPDN
Reverse 5M UPDN_S
Reverse DNUP DBot
Reverse UPDN DTop
Rockstar Dn
Rockstar Dn1
Rockstar DnTA
Rockstar ETF Dn
Rockstar ETF Dn1
Rockstar ETF Up
Rockstar ETF Up1
Rockstar Up
Rockstar Up1
Rockstar UpTA
RVol NewHi
RVol NewLo
Scalp Dn CC1
Scalp Up CC1
Sell HiVol OTCOpn05
Sell HiVol OTCOpn25
Sell OImb Sim 5PCT
Sell OImb Sim 5PCT1
Sell OImb Sim AK
Sell OImb Sim AK1
Sell OImb Sim AR
Sell OImb Sim MGMO
Sell OImb Sim MGMO1
Sell OImb Sim MGMOPG
Sell OpenClose ImbDK
SHO Me The Money
Shyamalator Dn
Shyamalator Dn PM
Shyamalator Dn Thin
Shyamalator T
Shyamalator Up
Shyamalator Up PM
Shyamalator Up Thin
Spec Jump Dn
Spec Jump Up
Spec Print DN
Spec Print Dn Thin
Spec Print UP
Spec Print Up Thin
Spec Run Dn LRP
Spec Run Up LRP
Spike Dn 10M
Spike Dn 10M10
Spike Dn 1M
Spike Dn 1MA
Spike Dn 1MB
Spike Dn 5M
Spike DN CCS50
Spike DN CCSL
Spike Dn Stay Thin
Spike Down Stair S
Spike Up 10M
Spike Up 1M
Spike Up 1MA
Spike Up 1MB
Spike Up 5M
Spike UP CCS50
Spike UP CCSL
Spike Up Stair S
Spike Up Stay Thin
Spike With Volume
Spike With Volume Dn
Spike With Volume Up
SPY Movers Ticker
Steady Stepping
Steady Trippin
Steam Train Dn
Steam Train Up
Stock Big Spread
Stock No Spread
Stocks on Move Down
Stocks on Move Up
Strong Stock
Sweep Down ThBP
Sweep Down Thin
Sweep Up ThBP
Sweep Up Thin
tester f print
Thin Buy
TI BreakDn Alrt 95
TI BreakOut Alrt1
Trading Outside
Trading Outside Bad
Trading Outside Good
Venus Bear
Vol Spike Roll NewHi
Vol Spike Roll NewLo
VolFSpike Roll DNUPB
VolFSpike Roll UPDNB
VolSpike NewHiS5v
VolSpike NewLoS5v
VolSpike Roll DNUP3
VolSpike Roll UPDN3
Volume Spike Dn
Volume Spike Up
VOLUME SURGE Minute
Volume Surge TTS
Weak Stock
xOpenTest