SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Sat Oct 31, 2020 7:38 pm

All times are UTC + 3 hours




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Fri Jan 06, 2012 10:54 pm 
Offline

Joined: Wed Apr 27, 2005 4:41 pm
Posts: 609
Location: Helsinki, Finland
OK,

so I'm testing QuantRouter (QR). It does look promising in the sense that it will allow some interesting strategies for fx.

Set up QuantRouter ok. Got it connected to IB ok (green traffic light is on). Btw is the any way to check the connectivity from QR?

Connected OQ to QR ok, the green traffic light is ok. Btw is there any way to check the connectivity between QR and OQ?

Created the usd/eur instrument according to the video. See dump.

But when I try dragging this new instrument to the quote monitor it always gives the error message "IB is not connected. Do you want to connect?" What am I doing wrong? And the interesting thing is that if I change AltSymbol EUR/USD(4)Bid|Ask to AltSymbol EUR/USD(26)Bid|Ask I still get the same error message on IB not being connect, not an error message for HotSpot.

And then a followup question: Where does QR do the symbol conversion for the different providers? Ie. how does QR know which symbol format to request from IB and HotSpot and so on?

Thx,
Eelofi


Attachments:
File comment: The new eur/usd for QR
New instrument for  QR.jpg
New instrument for QR.jpg [ 42.69 KiB | Viewed 10209 times ]
Top
 Profile  
 
PostPosted: Sat Jan 07, 2012 2:38 am 
Offline

Joined: Sun Oct 30, 2011 12:12 am
Posts: 220
In OQ, Menu Tools > Options > Configuration > Modes > Live > Is IB the Market Data Provider / Execution Provider?
If yes, shouldn't you change it to QuantRouter?

Warning: sometimes OQ requires to be restarted before taking into account a new value for these fields.


Top
 Profile  
 
PostPosted: Sat Jan 07, 2012 1:14 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6817
Hi,

have you looked through this doc?

http://www.smartquant.com/quantrouter/quantrouter.pdf

Regards,
Anton


Top
 Profile  
 
PostPosted: Sun Jan 08, 2012 1:52 pm 
Offline

Joined: Wed Apr 27, 2005 4:41 pm
Posts: 609
Location: Helsinki, Finland
Hi Guys,

thanks for your help.

@PBJ, you were absolutely right, IB was the provider in configuration. Thanks for the advice.

@Anton, yes I've read through the document, thanks for that. Also the video was very helpful.

BR,
Eelofi


Top
 Profile  
 
PostPosted: Sun Jan 08, 2012 4:10 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6817
Have you managed to run OpenQuant strategy with several data feeds / brokers finally?

Regards,
Anton


Top
 Profile  
 
PostPosted: Sun Jan 08, 2012 4:48 pm 
Offline

Joined: Wed Apr 27, 2005 4:41 pm
Posts: 609
Location: Helsinki, Finland
Nope, not at the momement as Forex for IB is closed at the moment. :cry:

But all of the connectivity is technically now ok, so I should have results early next wk. Additionally I'll need at least a second account matching the ones for you have connectivity in QR, I already requested several test accounts, but they are pending at moment. Any plans for futher Forex providers to be contained in QR: MBT or NordNet for example?


Top
 Profile  
 
PostPosted: Sun Jan 08, 2012 5:10 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6817
Hi,

I think NordNet is already ported to QR provider format.

Regards,
Anton


Top
 Profile  
 
PostPosted: Sun Jan 08, 2012 5:49 pm 
Offline

Joined: Sun Oct 30, 2011 12:12 am
Posts: 220
@eelofi: I'll be interested in learning more about your experience.

I'm curious: when you go live with a strategy on spot FX, how will you preload the most recent historical data?
Say you have a MA(20) / MA(50) crossover strategy based on 1h bars. Then when you go live, you need the 50 most recent hourly bars for each pair you trade to be able to compute the first value for MA(50) and make trading decisions. AFAIK, the institutional FX execution venues don't provide historical data, only realtime (Integral, Hotspot, Currenex).

I guess 2 options remain:
- run the strategy live, wait 50 hours and start trading
issues: What if your strategy requires 200 or 500 hourly bars? How do you resume trading after a crash (ie wait again)?
or
- run the strategy live, GetHistoricalBars() between DateTime.Now.AddDays(-6)* and DateTime.Now, call OnBar() for each of them...
issues: Which source to use (no historical data provider seems to offer intraday FX data via API)? Will GetHistoricalBars(string provider, ...) work if 'provider' is not the same as the Market Data Provider set in Options > Configuration > Modes > Live?


* Adding -6 days (= substracting 6 days) instead of adding -50 hours only is to take weekends and holidays into account


Top
 Profile  
 
PostPosted: Sun Jan 08, 2012 7:30 pm 
Offline

Joined: Wed Apr 27, 2005 4:41 pm
Posts: 609
Location: Helsinki, Finland
@PBJ: Have you checked the backfill facility at IB? They provide it at least for stocks, 1min bars. I'd believe they provide for forex as well.

So basically you start your strategy, which takes a look at the last saved bar and queries IB for the missing ones in between. I think you can spesify your bar lenght in the query.

In forex this won't at least in the beginning be problem as the strategy in mind won't require any lenghty history.

BR,
Eelofi


Top
 Profile  
 
PostPosted: Sun Jan 08, 2012 7:36 pm 
Offline

Joined: Wed Apr 27, 2005 4:41 pm
Posts: 609
Location: Helsinki, Finland
Dr. Anton Fokin wrote:
Hi,

I think NordNet is already ported to QR provider format.

Regards,
Anton


Anton,
I believe there's something wrong in NordNet in QR. Please see: http://www.smartquant.com/forums/viewtopic.php?f=81&t=9864

Br,
Eelofi


Top
 Profile  
 
PostPosted: Mon Jan 09, 2012 7:32 pm 
Offline

Joined: Sun Oct 30, 2011 12:12 am
Posts: 220
@eelofi,

Thanks for your reply.
I guess you are referring to the second approach I mention: calling GetHistoricalBars() in OnStrategyStart().
That was the only possibility I can think of but...
1- that requires an IB account
2- GetHistoricalBars("IB", Instrument, begin, end, BarType.Time, 60) returns an empty BarSeries on my side
3- IB TWS doesn't seem to be very stable (I see TWS trying to reconnect sometimes, although none of my other Internet services is down)
4- Is the call in point 2 (above) supposed to work if another market data provider is set in OQ's options?

So I was wondering how other FX algo traders using OQ do...


Top
 Profile  
 
PostPosted: Mon Jan 09, 2012 7:48 pm 
Offline

Joined: Wed Apr 27, 2005 4:41 pm
Posts: 609
Location: Helsinki, Finland
PBJ wrote:
@eelofi,

Thanks for your reply.
I guess you are referring to the second approach I mention: calling GetHistoricalBars() in OnStrategyStart().
That was the only possibility I can think of but...
1- that requires an IB account
2- GetHistoricalBars("IB", Instrument, begin, end, BarType.Time, 60) returns an empty BarSeries on my side
3- IB TWS doesn't seem to be very stable (I see TWS trying to reconnect sometimes, although none of my other Internet services is down)
4- Is the call in point 2 (above) supposed to work if another market data provider is set in OQ's options?

So I was wondering how other FX algo traders using OQ do...


1) true
2) how long interval are you trying to retrieve? It's a long time since I solved those issues, but try a short period first. And it should quite fresh, like max Friday now. Is the quote monitor working ok for the instrument? That's your first check.
3) I haven't noticed any major issues in stability of the real trading account. But with the simulated account plenty of problems also today :) Just now trying to get QR to connect...
4) Don't know, only lately been using IB with OQ

I'm not a FX trader - not until now - but happend to run into a old friend who had an interesting FX strategy elsewhere, trying now to set it up with OQ + QR.


Top
 Profile  
 
PostPosted: Mon Jan 09, 2012 7:54 pm 
Offline

Joined: Wed Apr 27, 2005 4:41 pm
Posts: 609
Location: Helsinki, Finland
Yes, yes, yes,

first hurdle overcome. Took me a while, but OQ is now receiving FX data via QR from IB!

BR,
Eelofi


Last edited by eelofi on Mon Jan 09, 2012 11:38 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Mon Jan 09, 2012 8:02 pm 
Offline

Joined: Wed Apr 27, 2005 4:41 pm
Posts: 609
Location: Helsinki, Finland
eelofi wrote:
PBJ wrote:
@eelofi,
1- that requires an IB account


1) true


Add on to 1). Not necessarily. It's again a long time ago, I forget already. But you could activate the (terrible) web client from http://individuals.interactivebrokers.c ... p_demo.php and the activate the directx = edit global configuration - api - settings. I will give you at least some connectivity. Don't know whether the backfill is possible or not.


Top
 Profile  
 
PostPosted: Mon Jan 09, 2012 8:32 pm 
Offline

Joined: Sun Oct 30, 2011 12:12 am
Posts: 220
@eelofi

Thanks for your help.
It works now when I request a smaller amount of data (ie between DateTime.Now.AddDays(-4) and DateTime.Now).
I'll do some tests and reply here.

1- I have a real, live IB account anyway so no big deal. Was just saying that it's strange to require an IB account when you want to be able to trade elsewhere (Integral). Might work with the demo as you suggest.
2- Yes, Quote Monitor is working, that was my first check too. I need 200 hourly bars, which is a bit more than 8 days (not accounting for weekends).
3- How long have you used IB with OQ? Thanks for the feedback
4- The answer is yes: OQ can be set to get live data from Integral (in Options) but at the same time you can call GetHistoricalBars("IB", ...) in the strategy's code, it will connect to IB. You end up connected to Integral AND IB.

Glad to hear you're able to connect with QR! I will certainly be interested in your experience later :)
Feel free to share!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group