quantopian / zipline

Zipline, a Pythonic Algorithmic Trading Library
https://www.zipline.io
Apache License 2.0
17.26k stars 4.67k forks source link

Forex support #1285

Open davidandreoletti opened 8 years ago

davidandreoletti commented 8 years ago

Hi,

Thanks for the wonderfull zipline package. I have been reading the documentation and I have not found any strong indication that Forex back testing is supported out of the box.

a) Is it supported ? b) If not, from a high level point of view, what "components" within zipline should be modified to add support for it ?

Regards,

developeralgo8888 commented 7 years ago

i believe quantopian contributors are mostly stock traders and quantopian itself , i don't think has any programmers with Forex background or they are more interested or stuck in Stocks because their investors are demanding that . its always about the investor money, if you think again. The FOREX asset request has been open for almost 2 years now . FX is the most liquid and traded OTC regulated market without a centralized exchange , almost 4 Trillion US$ turnover traded every day while the stocks is about 400 Billion US$ turnover per day on regulated exchanges.

They rewrote Zipline 1.0.1 but guess what they just forgot to add Forex Asset !!! WTF . The issue is that their investors seem to be pushing them to monetize the quantopian model very fast and since most of their guys are experienced in Stocks , it is a safe bet. May be and just may be after they will think about forex after 10 years.

BryanFletcher commented 7 years ago

We're going to start working on fully integrating Zipline with FXCM for historical data, forex support, and live trading.

If anyone in the community needs free FX historical data in the meantime to play with, just let me know or feel free to grab it here. We have up to 10 years of excellent data on 39 pairs from our 16 liquidity providers.

Also, the link below will give you a decade of daily FXCM Speculative Sentiment Index data below on the major currency pairs back to 11/01/2006.

https://apiwiki.fxcorporate.com/api/daily.csv

Primer: How to use SSI

Best regards,

Bryan Fletcher Product Manager Algorithmic Trading bfletcher@fxcm.com

Disclaimer: I work at FXCM. Our service includes products that are traded on margin and carry a risk of losses in excess of your deposited funds. The products may not be suitable for all investors. Please ensure that you fully understand the risks involved.

femtotrader commented 7 years ago

Nice idea @BryanFletcher !

Hope zipline will support a hedging blotter, bracket orders and advanced statistics (MAE, MFE, BSO...)

https://github.com/quantopian/zipline/issues/1357 https://github.com/quantopian/zipline/issues/366 https://github.com/quantopian/zipline/issues/189 https://github.com/quantopian/zipline/issues/1375

This SSI can be a very interesting data source.

Are you interested to allow us to use it in pandas-datareader and so provide an easy access to it for Pandas users ?

Here is some Pandas code that can be useful.

BryanFletcher commented 7 years ago

Thanks @femtotrader !

Yes, feel free to use the data in pandas-datreader. We can update the file on a regular basis, but we're not able to stream it. Not yet at least.

davidandreoletti commented 7 years ago

@BryanFletcher That's a good news. Has FXCM planned a timeframe to get forex support into zipline ?

BryanFletcher commented 7 years ago

@davidandreoletti Thanks for sharing your interest. I'm afraid I don't have an ETA at this point, but it's definitely a key focus for us.

davidandreoletti commented 7 years ago

Quick heads up to those interested (@jimbojetlag, @michaeljohnbennett, @BryanFletcher, @femtotrader ...) in Forex currency support:

I have the same idea and started execution on that plan: a) Fetch Data currency data from OANDA using Panda DataReaders b) Create PandaDataReader bundle for zipline to ingest data from (a) c) Add Backtesting Forex support in zipline d) Add Trading Forex support in zipline

Progress report (31/12/2016): a) PR submitted. Merging soon. b) Work just started. No draft bundle yet Cancelled d/c) Work not started. Cancelled

Forex related PRs:

You are very welcome to contact me and provide help with Pull Requests, especially for (b/c/d).

davidandreoletti commented 7 years ago

@BryanFletcher Is there any progress on your side ?

developeralgo8888 commented 7 years ago

Quantopian has become so much of a garbage platform. They had the bait and switch model, Open source to attract retail users on STOCKS but don't bother about other assets . First they need to monetize the suckers they have pulled in , before they can move to other assets e.g Forex . If you have been doing advanced Algo trading for a while you will understand how basic Quantopian platform is. It is not flexible at all.

davidandreoletti commented 7 years ago

@developeralgo8888 I thank you for honest feedback. I did not do any advance algo trading (mostly toying around). Independently of your answer, I decided not to use quantopian and python in general for algo trading.

magick93 commented 6 years ago

Hi All

Was FX support ever added to Zipline?

JamesKBowler commented 6 years ago

The RESTAPI is now out. Says it supports Zipline... but does Zipline support Forex? https://fxcm.github.io/rest-api-docs/

Sdoof commented 6 years ago

Hi Folks, any one knows how to use Zipline to ingest our own FX data (either Oanda , FXCM or TrueFX)?

hsm207 commented 4 years ago

What's the forex support like for zipline in 2020?