Pages:
Author

Topic: Goomboo's Journal - page 36. (Read 281462 times)

newbie
Activity: 58
Merit: 0
March 03, 2012, 05:39:36 AM
How much does this strategy rely upon Bitcoin's continued extremely high volatility? 

I expect the volatility to decrease as the market becomes more mature (more actors, more based on the actual value of bitcoin, less hacks, more reliable bitcoin companies). And at some point the bitcoin technology might stabilize (currently fpga or ASIC could shake things up).

As volatility decreases, there were be more sideways action, and the fees will eat up more or all of your profits.


I have also wondered about this. However you have to remember that we are still very early on in the game. Not all the bitcoins have been mined yet, and it is still a long way from mainstream acceptance. I believe this will keep it in the realm of speculators for a while to come. How long is a while? No idea. But I am going to reassess my investment on a 12 monthly basis - can't see much long term stability developing in that time frame.
legendary
Activity: 1868
Merit: 1023
March 02, 2012, 10:50:35 PM
How much does this strategy rely upon Bitcoin's continued extremely high volatility? 

I expect the volatility to decrease as the market becomes more mature (more actors, more based on the actual value of bitcoin, less hacks, more reliable bitcoin companies). And at some point the bitcoin technology might stabilize (currently fpga or ASIC could shake things up).

As volatility decreases, there were be more sideways action, and the fees will eat up more or all of your profits.
legendary
Activity: 2053
Merit: 1356
aka tonikt
March 02, 2012, 05:05:38 PM
I expect that if you could make this available for non programers then there would be some paying interest demand for it, I'd be interested if it was idiot proof or nearly & not needing a PHD in geekism to set up with different parameters
I could have, but you should not be trusting strangers in internet to take care of such stuff.

If the 2 crossing EMAs tech really works more often that not (anyone tested it? results?) I would let a bot run by some forum member with rep to play with a few of my BTC. A good bot would even be more than enough for a speculative fund quoted on the GLBSE.  
I tested it many times, in many different combinations, with the historical data.
Basically if you optimize for profit, much less than 50% of your entries are winning ones in such H1 based system.
But in general you profit - from following the trend, because as we all have noticed, when it goes up or down, then it really does enough to compensate the small loses...
At least so far - nobody knows tomorrow. Even with the historical data the optimal values depend on the period you choose - how many days you test and from when...

But my general measures, of a long term data, also show that if you switch from H1 to D1, you might actually get a similar scale of a potential profit - just with fewer swaps.
And also a better percentage of winning bets - if you care Smiley
legendary
Activity: 2352
Merit: 1064
Bitcoin is antisemitic
March 02, 2012, 05:03:03 PM
I expect that if you could make this available for non programers then there would be some paying interest demand for it, I'd be interested if it was idiot proof or nearly & not needing a PHD in geekism to set up with different parameters
I could have, but you should not be trusting strangers in internet to take care of such stuff.

If the 2 crossing EMAs tech really works more often than not (anyone tested it? results?) I would let a bot run by some forum member with rep to play with a few of my BTC. A good bot would even be more than enough for a speculative fund quoted on the GLBSE.  
legendary
Activity: 2053
Merit: 1356
aka tonikt
March 02, 2012, 04:43:17 PM
I expect that if you could make this available for non programers then there would be some paying interest demand for it, I'd be interested if it was idiot proof or nearly & not needing a PHD in geekism to set up with different parameters
I could have, but you should not be trusting strangers in internet to take care of such stuff.
It's a piece of software, which you run on your PC, that deals with your money - you don't know me, so you shouldn't be taking it from me if you cannot understand what is inside.
Otherwise someone will screw you over one day - and I'm not being cynical here, it's just life that we all need to deal with Smiley

What I can do to help you..
You tell me what do you actually need and I can post some simple scripts here, so others could verify if I'm not screwing you over with them.
And then you can run them on your pc, if you want. I can eventually tell you what you need to install first - a software from some trusted source, like google, oracle or microsoft Smiley

But basically, as when it comes to bitcoincharts+bitcoinica, I believe all you need is a continuously running web browser - you can afford it, cant you?
For the new mtgox api, which i think is much better, they have a crypto with some weird hmac stuff - I dont know how easy it would be to do it in javascript. Probably php would be best here, since their example actually works - and there is not much more one needs to add over that.
donator
Activity: 3108
Merit: 1166
March 02, 2012, 04:25:11 PM
most of the time you will miss it when your not glued to your computer.

this might help

http://www.bitcoin-tools.de/
Why bother waking up?
It's actually quite easy to create an own bot. Just don't run it on a Linode VPS - better use your own PC at home Smiley

1) Every hour fetch the last 100 or so candles from the bitcoincharts: http://bitcoincharts.com/charts/chart.json?m=mtgoxUSD&i=H1&c=1&s=2012-02-20
2) Calculate EMA(long) and EMA(short) from the recent data: http://www.iexplain.org/ema-how-to-calculate/
3) If the lines have just crossed: execute the mtgox or bitcoinica API, according to the changing trend.
As simple as that.

You can basically do it in one relatively simple script; use php, python, bash, javascript, anything that suits you... I personally prefer Go - it's a great language.
Then run the 3 steps every hour (crontab, windows scheduler or whetever) - and you have no need to wake up in a middle of a night. Unless only to check if your bot is doing well... Tongue

I expect that if you could make this available for non programers then there would be some paying interest demand for it, I'd be interested if it was idiot proof or nearly & not needing a PHD in geekism to set up with different parameters
legendary
Activity: 2053
Merit: 1356
aka tonikt
March 02, 2012, 03:34:35 PM
most of the time you will miss it when your not glued to your computer.

this might help

http://www.bitcoin-tools.de/
Why bother waking up?
It's actually quite easy to create an own bot. Just don't run it on a Linode VPS - better use your own PC at home Smiley

1) Every hour fetch the last 100 or so candles from the bitcoincharts: http://bitcoincharts.com/charts/chart.json?m=mtgoxUSD&i=H1&c=1&s=2012-02-20
2) Calculate EMA(long) and EMA(short) from the recent data: http://www.iexplain.org/ema-how-to-calculate/
3) If the lines have just crossed: execute the mtgox or bitcoinica API, according to the changing trend.
As simple as that.

You can basically do it in one relatively simple script; use php, python, bash, javascript, anything that suits you... I personally prefer Go - it's a great language.
Then run the 3 steps every hour (crontab, windows scheduler or whetever) - and you have no need to wake up in a middle of a night. Unless only to check if your bot is doing well... Tongue
sr. member
Activity: 352
Merit: 250
March 02, 2012, 03:24:45 PM
most of the time you will miss it when your not glued to your computer.

this might help

http://www.bitcoin-tools.de/

Thx for the link.
Here just a pictures of my resent trades. I now this strategy is expected to make a loss with most of your trades and if you make a profit it is a big one.
Still have the feeling i'm bleeding a little bit much lately..

Ledgend:
Green = Profit
Red = Loss
Yellow = intrest from bitcoinica

legendary
Activity: 1904
Merit: 1037
Trusted Bitcoiner
March 02, 2012, 03:14:15 PM
most of the time you will miss it when your not glued to your computer.

this might help

http://www.bitcoin-tools.de/
sr. member
Activity: 352
Merit: 250
March 02, 2012, 03:10:45 PM
So did you guys catch the drop. I personally was sleeping  Roll Eyes

@ goomboo. I was just wondering if you could do a fast backtrack of your system (so the 21/10 crossover) but with a 1 hour delay after every crossover.
This because sometimes the crossover happens just before a huge sell/buy but most of the time you will miss it when your not glued to your computer.
legendary
Activity: 1904
Merit: 1002
February 29, 2012, 11:03:01 PM
Just a point of clarification... curve-fitting it the process regardless of success.  The term you are looking for is overfitting.

http://en.wikipedia.org/wiki/Overfitting

In the finance and trading world, we use the term curve-fitting to describe the process of making your trading strategy fit the price curve.  But yes, that's what it is - overfitting.

Edit - what I mean to say is that we literally say "curve-fitting" when describing our optimization and write "curve-fitting" in textbooks about trading systems.  Interesting that the technical term doesn't actually "fit" our usage of it :p ... thanks for pointing that out.

NP... pointing out nearly irrelevant discrepancies is what I do.  That, and inflaming trolls Tongue.
sr. member
Activity: 409
Merit: 250
February 29, 2012, 10:51:21 PM
Just a point of clarification... curve-fitting it the process regardless of success.  The term you are looking for is overfitting.

http://en.wikipedia.org/wiki/Overfitting

In the finance and trading world, we use the term curve-fitting to describe the process of making your trading strategy fit the price curve.  But yes, that's what it is - overfitting.

Edit - what I mean to say is that we literally say "curve-fitting" when describing our optimization and write "curve-fitting" in textbooks about trading systems.  Interesting that the technical term doesn't actually "fit" our usage of it :p ... thanks for pointing that out.
legendary
Activity: 1904
Merit: 1002
February 29, 2012, 10:31:12 PM
Just a point of clarification... curve-fitting it the process regardless of success.  The term you are looking for is overfitting.

http://en.wikipedia.org/wiki/Overfitting
sr. member
Activity: 409
Merit: 250
February 29, 2012, 10:05:31 PM
Goomboo, can I ask what software you are using? I would like to try and run some figures of my own.

I use:
-Ninjatrader - backtesting / optimizing
-Excel - taking Ninjatrader's output and applying formatting to "pretty" it up


Steps I followed:
1.  Download Ninjatrader and learn how to import data and create custom instruments
2.  Download the data from www.bitcoincharts.com and modify it in Excel such that it can imported (they have some mistakes where opens are greater than highs, etc.)
3.  Import the data into Ninjatrader
4.  Create a strategy
5.  Backtest and optimize the strategy
6.  Export the data to excel
7.  Put it in a pivot table, color the range, format it
8.  Put it in a picture and upload it

For anyone who is interested in stock, futures, forex, or commodities trading, I highly recommend Ninjatrader - it is a solid, solid platform.
sr. member
Activity: 409
Merit: 250
February 29, 2012, 10:00:37 PM
Quick questions: is that table showing results for daily or hourly quantised price data?  Does your profit factor take account of exchange fees?  If fees were (say) 20%, then obviously the better optimisation is to go for lower numbers of trades; if fees were 0%, then obviously we would want to optimise profit.

The table is showing results for hourly data.  Basically NinjaTrader did 600 backtests, spit the results out to me, and I put them in a colored table showing their relative value compared to the others.

Profit factor = gross gains / gross losses.  Any number above 1 means that the system was profitable while anything below means that it lost money.  It is based purely on price change in this backtest and commissions are not factored in.  You are absolutely right - if commissions are low, the higher frequency strategies can be profitably applied to the markets.

Longer questions/observations:

It seems that we're only seeing part of the picture in these charts, the green area (especially in the EMA table) is clustered around the bottom right.  The implication then is that there is more to see of this pattern.  For example, is this a long thin island horizontally (i.e. it is the fast parameter that is sensitive)?  Is it long and thing vertically (i.e. it is the slow parameter that is sensitive)?  Similarly, are both insensitive?


I'll show you that pattern for more data and then tell you why I didn't show this much data - the colors are changed since it's conditional formatting, but the areas are still differentiated.  The first set of charts I showed you were for 600 moving average combinations - here is is a chart of 10,000 unique combinations of both the EMA and SMA crossovers.

SMA Profit Factor
SMA Trades
EMA Profit Factor
EMA Trades

The reason I didn't include this much is because of a concept called curve-fitting.  Basically if you let the optimizer have its way, it will find the moving average combination that will buy at the bottom and sell at the top in the past perfectly, but will reduce your effectiveness going forward because the predictive power is minimal.  There are a few methods of determining if you are curve fitting, one of which is the number of trades.  If you have 30 trades or less, you more than likely have curve-fit your data or have too little information to make a good decision.

The second reason I didn't show this much data is the nature of what we're after here - the purpose of this is to teach short-term trend following trading systems.  In my opinion, any indicator which uses more than 50 periods is intermediate to long-term.  If you're trading in this region, you need to ask yourself why you aren't looking at a higher timeframe.

For example, is this a long thin island horizontally (i.e. it is the fast parameter that is sensitive)?  Is it long and thing vertically (i.e. it is the slow parameter that is sensitive)?  Similarly, are both insensitive?

Since we're dealing with a relatively few amount of trades (less than 500), I'd be wary to attach too much significance to contours in the data.  The reason these contours appear is because that region of specific averages captures an explosive move very well (curve fitting).  What we're after is a clump of above-average performance with a range of averages that "makes sense".  This increases our probability of staying alive when the markets change (which they constantly do).

Presumably we want to be aiming at the centre of a green pool, since that would only be an inferred-from-the-past selection of parameters we would want to choose such that large variations in parameter cause small variations in profit. i.e. if we're wrong in selection, we are still likely to end up in a profitable region.

Boom!  Exactly...markets always are changing.  What is best today won't be the best tomorrow.  We're trying to land in the region of above average profitability so that maybe we can survive the future.
newbie
Activity: 58
Merit: 0
February 29, 2012, 08:53:48 PM
Goomboo, can I ask what software you are using? I would like to try and run some figures of my own.
hero member
Activity: 504
Merit: 502
February 29, 2012, 05:03:01 AM
Fascinating charts.  (excuse me if I use the wrong technical words in the following, my background is signal processing, not finance).

Quick questions: is that table showing results for daily or hourly quantised price data?  Does your profit factor take account of exchange fees?  If fees were (say) 20%, then obviously the better optimisation is to go for lower numbers of trades; if fees were 0%, then obviously we would want to optimise profit.

Longer questions/observations:

It seems that we're only seeing part of the picture in these charts, the green area (especially in the EMA table) is clustered around the bottom right.  The implication then is that there is more to see of this pattern.  For example, is this a long thin island horizontally (i.e. it is the fast parameter that is sensitive)?  Is it long and thing vertically (i.e. it is the slow parameter that is sensitive)?  Similarly, are both insensitive?

How hard would it be to continue the plot to higher slow/fast parameter values?

Presumably we want to be aiming at the centre of a green pool, since that would only be an inferred-from-the-past selection of parameters we would want to choose such that large variations in parameter cause small variations in profit. i.e. if we're wrong in selection, we are still likely to end up in a profitable region.
sr. member
Activity: 409
Merit: 250
February 28, 2012, 09:27:07 PM
There are two questions that have been asked or alluded to that I will end the night by answering:

1.  What happens if the market goes sideways and I'm getting chopped up?

2.  What happens if we have many people trading our strategy?

1.  Let's answer the first one.  What happens if the market is going sideways and we are getting chopped up?  Simple answer: we stick with the system.  All of our testing assumed that we stuck with our system perfectly.  However, we must periodically re-evaluate our system and see if the parameters we chose initially are holding up.  After all, we chose our parameters based upon an optimization on the daily timeframe and we are trading the hourly.  Below is a chart of this optimization.  I ask every individual who has been learning from this thread and is serious about learning to trade and analyze markets to not move forward from this post until you have observed and understood the below chart.  I have put a border on the 10 / 21 crossover, showing you what we are currently trading.

Look first at the number of trades - as some individuals are noting - through commissions, the spread, and slippage - the more trades, the more money spent!  Therefore, we really should try and minimize the number of trades that we do in order to maximize our bottom line.  As we can see from the below chart, the longer the period of our moving averages, the fewer times we trade.  This hopefully should be intuitive by now.

We have to balance our desire to trade infrequently with what the market says is the most profitable area to trade in.  If you notice, they do not perfectly overlap.  Finding the best place to be - where we aren't chopped up but at the same time capture trends - does not have a cut-and-dry solution.  I can point you to a region, but I can't and won't point you to the answer.  You have to look at the charts below and find the right trade-off for you.  Essentially, you have to find what works for you and stick with it.

2.  What happens if we have too many people trading our strategy?  Look at the answer to the first question and think it through. We're not even trading the best strategy.  The serious individuals will be departing from "10 / 21" and finding a happy medium soon, leading to hopefully dozens of variants of the strategy, each of which is based upon the simple concept of following the trend.

donator
Activity: 3108
Merit: 1166
February 28, 2012, 08:09:23 PM
sr. member
Activity: 409
Merit: 250
February 28, 2012, 07:53:49 PM
Pages:
Jump to: