chrism2671 / PyTrendFollow

PyTrendFollow - systematic futures trading using trend following
MIT License
324 stars 67 forks source link

Additional DataProvider: CFD / non-futures based #3

Open svenissimo opened 6 years ago

svenissimo commented 6 years ago

Hi Guys sorry couldn't find another way of reaching out to you so feel free to delete issue as see fit.

Basically I came here from RobCarvers issues list. I've read his systematic trader book a million times and largely get the whole concept.. Well I think I do until I try and use his pysystemtrade framework and my head explodes.

I'm a long time python+linux dev but frankly I have a hard time following his implementation and its made worse by the fact I'm not trading futures atm..( have reasons)

Just then I spot PyTrendFollow... yey!! So I thought I'd have a dig around and see if I can add support for my CFD/FX broker. http://developer.oanda.com/rest-live-v20/introduction/

So 2 actual questions

  1. Can you think of any issues fitting a non 'Futures contract' data model into your platform? They have fx obviously but also CFD's on indexes, commod, metals and all that stuff but essentially not 'contract' based. Try and fit in to currency.py and spot.py? not sure intstrument makes much sense but not started look closely.
  2. If I get it working are you interested in a pull request etc.

Either way.. just wanted to say thanks, love the project and I can get my head round it so thats a good sign lol

cheers

chrism2671 commented 6 years ago

Hey!

Sure, if you can get it working & tested, I'm happy to include it. Perhaps we can improve the abstraction of instruments/brokers further in the process.

One thing to consider- think about the transaction costs when using CFDs. I did a back-of-the-envelope calculation for using IG, and figured I'd probably lose money once I accounted for their funding fees. Futures, by comparison, have no funding cost.

svenissimo commented 6 years ago

Chris,
fair point on the funding charge for sure. I’m not particularly looking to use the standard systems which are long and short. There are some cases where it pays to hold the instrument much like carry.

Unfortunately my current full time employment makes futures almost impossible without pre clearance and holding periods etc grrrr. Might change but for now I need to look at creative means of getting my fix.

I will go and do some more sums first before jumping in.

On 18 Mar 2018, at 16:32, Chris Muktar notifications@github.com wrote:

Hey!

Sure, if you can get it working & tested, I'm happy to include it. Perhaps we can improve the abstraction of instruments/brokers further in the process.

One thing to consider- think about the transaction costs when using CFDs. I did a back-of-the-envelope calculation for using IG, and figured I'd probably lose money once I accounted for their funding fees. Futures, by comparison, have no funding cost.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

svenissimo commented 6 years ago

Doh sorry, — Steve

On 18 Mar 2018, at 17:20, Stephen Foster stephen.foster@nerakltd.co.uk wrote:

Chris,
fair point on the funding charge for sure. I’m not particularly looking to use the standard systems which are long and short. There are some cases where it pays to hold the instrument much like carry.

Unfortunately my current full time employment makes futures almost impossible without pre clearance and holding periods etc grrrr. Might change but for now I need to look at creative means of getting my fix.

I will go and do some more sums first before jumping in.

On 18 Mar 2018, at 16:32, Chris Muktar notifications@github.com wrote:

Hey!

Sure, if you can get it working & tested, I'm happy to include it. Perhaps we can improve the abstraction of instruments/brokers further in the process.

One thing to consider- think about the transaction costs when using CFDs. I did a back-of-the-envelope calculation for using IG, and figured I'd probably lose money once I accounted for their funding fees. Futures, by comparison, have no funding cost.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.