Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

New options for PPO #163

Closed
wants to merge 21 commits into from
Closed

New options for PPO #163

wants to merge 21 commits into from

Conversation

cykedev
Copy link
Contributor

@cykedev cykedev commented Jan 17, 2014

I added some new options to PPO. Besiges the "normal" histogram based signal generation, its now possible to use the "speed" (PPO - previous PPO) as signal generator.

Thresholds for crossing situations, non crossing situations and possible rebound situations can be configured. In this case, the "normal" signal generation is ignored.

So it's possible to adjust the personal trading strategy wit the PPO indicator.

Besides histogram based, it's now possible to act 'speed' based.
Speed is PPO - previous PPO.

You can define thresholds for crossing, non crossing and possible
rebound situations to act as signals.
Conflicts:
	methods/indicators/PPO.js
Conflicts:
	methods/PPO.js
@askmike
Copy link
Owner

askmike commented Jan 21, 2014

Looks very interesting, though you could maybe point me to some documentation about the new parameters or maybe explain them a little? Is this part of a standard PPO or an improvement?

@cykedev
Copy link
Contributor Author

cykedev commented Jan 21, 2014

No, it's not "standard" ;-)
I found an interesing idea here an wanted to test the algorithm.

The idea is to generate signals earlier than with the classic lagging PPO/MACD.
I'm currently testing parameters - these are my settings at the moment

  // use speed (PPO - pevious PPO) to act as trigger
    tradeBySpeed: true,
  // when we have a crossover
  crossSpeedBSellThreshold: -0.02,
  crossSpeedBuyThreshold: 0.02,
  // when we have no crossover
  noCrossSpeedSellThreshold: -0.045,
  noCrossSpeedBuyThreshold: 0.05,
  // sell when price rises very fast
  reboundSpeedSellThreshold: 0.12,
  reboundSpeedBuyThreshold: -0.14,
  // stop trading for x intervals after rebound buy/sale
  waitAfterRebound: 1,

@cykedev
Copy link
Contributor Author

cykedev commented Jan 21, 2014

I have an Excel based backtest tool if anyone is interested.

@askmike
Copy link
Owner

askmike commented Jan 21, 2014

that looks amazing, will def take a look and merge this in. Also I want backtesting in localDB asap, should not be hard.

@cykedev
Copy link
Contributor Author

cykedev commented Jan 21, 2014

got an calculation error, getting ~ 5% BTC-e PPC/USD 15m candles (0,2% fee) for 1 week vs. -5% buy and hold.

@boxxa
Copy link

boxxa commented Jan 21, 2014

This would be interesting. I have been building this application to run on my RaspberryPi which monitors BTC_USD and LTC_USD for historical data. I can move the database to a permanent server if back testing data could be integrated with an API

@askmike
Copy link
Owner

askmike commented Jan 21, 2014

@cykedev what do you mean error? Caused By gekko or?

@boxxa what do you mean integrated in an API? Currently the localDB is storing all historical data required to do backtesting (minimally, no slippage data etc), so backtesting is just about loading all data from a specified timerange and bubbling it through Gekko. The current architecture does not care about if the data is realtime and if 1min ticks happen once a minute etc.

If you have your own data you could convert it to Gekko's format (1min ohcl-v-vwp candles in nedb daily databases) relatively easy (let me know if you need help with this).

In the future we're even going to abstract out gekkos datastore so you can feed gekko historical data through external sources (like websocket / redis / etc) and it will spit out results.

@cykedev
Copy link
Contributor Author

cykedev commented Jan 21, 2014

@askmike no - i did a mistake in calculating stats I posted here - see my comment above for new stats of my backtest:

tested one week 15m candles
BTC-e with PPC/USD
got 5% profit (with 0.02% fees)
buy and hold was -5%

@boxxa
Copy link

boxxa commented Jan 21, 2014

@askmike One of the things I noticed when doing testing and multiple installs was the advice would not be given for about a day while it collected data. Was seeing if there is a way to resolve this with a bitcoinchats alternative that supported other currencies to help new installs load historical data to send advice quicker

@askmike
Copy link
Owner

askmike commented Jan 21, 2014

@cykedev ah sounds great, I'm currently looking at auto trading in localDB. Will merge this in after that.

@boxxa So we had some discussions about this before and I really don't like bitcoincharts: Not all their data is calculated 100% correct and the API is not really that stable (see #77 and #24). Here is some more discussion about better solutions. Note that I did already setup Gekko in way that people can just send daily database files to each other (even if they are in different timezones etc, days are UTC based), the only hard thing is trusting the source.

@askmike askmike closed this Feb 12, 2014
@askmike
Copy link
Owner

askmike commented Feb 12, 2014

I think it says I closed because I deleted the localDB branch (merged into master), I am looking at this!

Edit: can't reopen but I'll cherrypick all these commits myself.

@cykedev cykedev deleted the test branch February 16, 2014 19:32
@mazhead
Copy link
Contributor

mazhead commented Apr 14, 2014

@cykedev any chance adapting this pull for the latest version of gekko?

@cykedev
Copy link
Contributor Author

cykedev commented Apr 14, 2014

I'm sorry no but feel free to adopt the code

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants