Bitcoin Forum
November 21, 2017, 11:04:07 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 [15]  All
  Print  
Author Topic: Wouldn't it be nice... (the LazyWhale algorithm)  (Read 24247 times)
bucktotal
Full Member
***
Offline Offline

Activity: 230


View Profile
February 13, 2015, 11:07:11 PM
 #281

actually, full disclaimer: i do not trade using these signals. to date i've done a bit better than my lazywhale system, because im not as lazy. but i thought lets just see how it does. i'd imagine most lazy-whale systems wont do well during small trend flipping periods. best just not to trade maybe.

im my case, the long timescale signal and can easily flip back and forth several times this week. often the signal will flip and its just a warning to be buying or selling over the following week. the lazyWhale will come in and be the floor/ceiling for the next little while, etc...

its easy to see how a simple system would have crushed this exponentially growing market over the years. certainly doesn't mean it will continue. Goomba's 10/21 thread (https://bitcointalk.org/index.php?topic=60501) is a great example of a solid lazy-whale system.

Join ICO Now Coinlancer is Disrupting the Freelance marketplace!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1511305447
Hero Member
*
Offline Offline

Posts: 1511305447

View Profile Personal Message (Offline)

Ignore
1511305447
Reply with quote  #2

1511305447
Report to moderator
oda.krell
Legendary
*
Offline Offline

Activity: 1386



View Profile
February 13, 2015, 11:20:15 PM
 #282

actually, full disclaimer: i do not trade using these signals. to date i've done a bit better than my lazywhale system, because im not as lazy. but i thought lets just see how it does. i'd imagine most lazy-whale systems wont do well during small trend flipping periods. best just not to trade maybe.

im my case, the long timescale signal and can easily flip back and forth several times this week. often the signal will flip and its just a warning to be buying or selling over the following week. the lazyWhale will come in and be the floor/ceiling for the next little while, etc...

its easy to see how a simple system would have crushed this exponentially growing market over the years. certainly doesn't mean it will continue. Goomba's 10/21 thread (https://bitcointalk.org/index.php?topic=60501) is a great example of a solid lazy-whale system.



Hm. Respectfully disagree Smiley Goomba's thread is what got me into algorithmic trading back in the day, but I never liked the ultra simple setup he used... I remember writing a long post about backtesting several versions of it, under more realistic assumptions (trading cost, and profit "stability" over time). In the end I had to conclude that a pure EMA strategy works, but one has to accept many many unprofitable trades in the process (which is okay if you only care about the total profit, but the goal of this signal is to minimize the occurrence of "unnecessary" trades)

I'm still very surprised that your signal is based on a single pair of parameters. I think you posted about a backtest on Bitstamp data... did you ever test it on Gox data (mainly to see where it would have sold during the $32 bubble)?

If I understand correctly what you're doing, and your smoothing is applied uniformly, you do get very similar results (i.e. not selling too early during the big "bubbles") despite only one parameter pair. Full disclaimer from my side: I never found a pair that can do that Cheesy If the parameters are "wide" enough to no sell too early in a bubble, they fail to buy back early enough during a reversal. If they are "narrow" enough to buy back at a good spot, they also sell to often in a rally.

Not sure which Bitcoin wallet to use? I suggest to take a look at Electrum.
Electrum is an open-source lightweight client: user friendly, fast, and one of the safest ways to store, send or receive bitcoins.
For executables (Windows, OSX, Linux, Android), source code and documentation, see the Electrum homepage.
oda.krell
Legendary
*
Offline Offline

Activity: 1386



View Profile
February 14, 2015, 12:11:13 AM
 #283

Last post for today Smiley

Here we go again...

Buy @236, Bitfinex
Buy @237, Bitstamp

(previous trade: Sell @311, Bitstamp)


I'm sure most in here know that we're dangerously close to a zone of major resistance, in the form of the 2014 downwards trendline, currently at around 255-260 USD. The algorithm is mostly "dumb momentum" however, and doesn't take support/resistance trendlines into account though, so, as before: don't blindly follow this signal.

Not sure which Bitcoin wallet to use? I suggest to take a look at Electrum.
Electrum is an open-source lightweight client: user friendly, fast, and one of the safest ways to store, send or receive bitcoins.
For executables (Windows, OSX, Linux, Android), source code and documentation, see the Electrum homepage.
bucktotal
Full Member
***
Offline Offline

Activity: 230


View Profile
February 14, 2015, 01:15:31 AM
 #284

actually, full disclaimer: i do not trade using these signals. to date i've done a bit better than my lazywhale system, because im not as lazy. but i thought lets just see how it does. i'd imagine most lazy-whale systems wont do well during small trend flipping periods. best just not to trade maybe.

im my case, the long timescale signal and can easily flip back and forth several times this week. often the signal will flip and its just a warning to be buying or selling over the following week. the lazyWhale will come in and be the floor/ceiling for the next little while, etc...

its easy to see how a simple system would have crushed this exponentially growing market over the years. certainly doesn't mean it will continue. Goomba's 10/21 thread (https://bitcointalk.org/index.php?topic=60501) is a great example of a solid lazy-whale system.



Hm. Respectfully disagree Smiley Goomba's thread is what got me into algorithmic trading back in the day, but I never liked the ultra simple setup he used... I remember writing a long post about backtesting several versions of it, under more realistic assumptions (trading cost, and profit "stability" over time). In the end I had to conclude that a pure EMA strategy works, but one has to accept many many unprofitable trades in the process (which is okay if you only care about the total profit, but the goal of this signal is to minimize the occurrence of "unnecessary" trades)

I'm still very surprised that your signal is based on a single pair of parameters. I think you posted about a backtest on Bitstamp data... did you ever test it on Gox data (mainly to see where it would have sold during the $32 bubble)?

If I understand correctly what you're doing, and your smoothing is applied uniformly, you do get very similar results (i.e. not selling too early during the big "bubbles") despite only one parameter pair. Full disclaimer from my side: I never found a pair that can do that Cheesy If the parameters are "wide" enough to no sell too early in a bubble, they fail to buy back early enough during a reversal. If they are "narrow" enough to buy back at a good spot, they also sell to often in a rally.

fair enough. goomboos system was simple, hyper-simple. i found something like 6/18 performed better in 2013 and i think a few others also found 10/21 wasn't so useful around the end of that thread. but, as the market has grown, the parameters have changed. anyway, that thread is just a good one in general i think, but i can understand your quest for something better. i agree pure ema strats are not even close the best, but they certainly fall in the "lazy" category. 

never used gox data. my guess is with gox data it would have given a signal a few weeks into the downtrend. they were strong oscillating trends back in the day.








sidhujag
Legendary
*
Offline Offline

Activity: 1638


View Profile
February 16, 2015, 06:20:56 AM
 #285

OP:


I think what you wanted to do was a good idea (profiting as much as possible from bitcoin's price behaviour but integrating trading into the mix but with the least effort (aka fewer trades possible)), but the actual implementation might not be the best one.

First of all it is based on assumptions that should not be taken for granted:

"(1) Bitcoin can experience massive gains in very short time, so by default, your position should be long.

(2) However, if there is a very clear trend reversal to the downside, sell.

(3) If you sold too early (into a downtrend that didn't manifest), don't hesitate to buy back at a small loss if necessary, because: see (1) above."



A trader should not be biased, for all he knows, bitcoin is a bubble that might continue to crash once it actually bursts. So the "favour a long position" strategy might work as long as bitcoin is in "pump mode", until it doesn't (the "dump mode"). A trader should only focus on the chart, it should tell him all he needs to know.

I think you should just forget about algorithms and complicated indicators and just trade with very basic TA tools like triangles and trend lines (on high time frames only, considering you want to minimise effort as a trader) depending on how much effort you want to put in the "trading part" of the investment strategy (if you want to incorporate short selling or not, how many trades do you want do perform every a month/every few months, etc).


Instead of "LazyWhale algorithm", it would just be the "LazyWhale strategy".

An example using 2013-2014:



Most of these is what I actually did in my trading (while shorting on the downside instead of just holding USD) and posted them here (as others have, it's just to say that it's not just hindsight Tongue), playing smaller waves too tho (it depends how "Lazy" you want your "LazyWhale" to be).


If you use complicated indicators and such, your "buy signal" might be a mistake and you might buy at a top. You should instead use simple trade setups like "buy the wedge breakout/sell the wedge breakdown" because that way you know that when you execute your trade the price will move in your direction massively right away. You're able to time the market (and estimate the magnitude of a trade) and avoid getting chopped off by consolidations and noise that might mess with your indicators and algorithms.

PS: you cannot really see the double top in that high time frame but on lower ones it is pretty flagrant.




I find tls are the way to go they are the earliest indicator.. best risk reward.. others either repaint or they get you in late.. you always have to have an exit or stoploss with any entry and its hard to with moving averged which are already late

★☆★Syscoin - Decentralized Marketplace and Multisig Platform
Pay with Bitcoin, ZCash and many more
For more visit Syscoin.org  ★☆★
oda.krell
Legendary
*
Offline Offline

Activity: 1386



View Profile
February 16, 2015, 11:59:18 AM
 #286

I find tls are the way to go they are the earliest indicator.. best risk reward.. others either repaint or they get you in late.. you always have to have an exit or stoploss with any entry and its hard to with moving averged which are already late

True, but: how do you backtest a discretionary strategy (based on trendline estimations, among others)?

There's no way around the following dilemma:

Using the full range of human intuition, pattern recognition and, well, intelligence, yields "discretionary trading". Quite possible the most profitable way to trade, but also the hardest one to estimate, quantitatively, if and how profitable it is.

Algorithmic trading is a reduction of the above in terms of available algorithms (not everything a human can do can be implemented as a TM), it gives some additional capacity however (crunching big data), and it comes with a boon: running the algorithm on historical data to estimate performance.

I'm dismissing neither. Both are valuable tools. I just reject any easy answer that says "only algo trading works", or "only discretionary trading gives good results". Both answers would be missing the trade-off involved in this decision, imo.

Not sure which Bitcoin wallet to use? I suggest to take a look at Electrum.
Electrum is an open-source lightweight client: user friendly, fast, and one of the safest ways to store, send or receive bitcoins.
For executables (Windows, OSX, Linux, Android), source code and documentation, see the Electrum homepage.
uki
Legendary
*
Offline Offline

Activity: 1176


cryptojunk bag holder


View Profile
February 16, 2015, 03:25:01 PM
 #287

A pity I discovered this thread so late. Thanks a lot for the courage of sharing your ideas publicly.
It is not that easy task to create your own working strategy, first of all because you think of plethora of different signals that can be used and that you want to be used, secondly because the signals you have chosen may very well fit the historical data, with no guarantee that they will work in future - bringing you back to the point one, I believe, with the need to add some more signals and making the whole idea overly complex. That is where you are now, I believe.

Now, if I may suggest something is to check, if signal #1 has the long enough observation window? That is whether the medium term signal is enough to filter our major trend change and thus adjust the asymmetry of signal #3 accordingly.


Alright. Initially, when people asked how the algorithm works internally, I refused to specify it any further. Now that nobody cares anymore, here's the basic idea ^_^

Note: I'm not going to fill in the exact numerical parameters of the the technical/indicator signals. No need to encourage frontrunning. But in principle, with the details I'm about to give, you could find your own (and probably very similar) parameters by training the individual parts over the market data that is the same for everyone.

The trade signals of this algorithm are a complex condition based on three technical signals.

Signal #1, the "main" signal, is a medium term momentum signal. Think "daily EMA20+10 crossover", but the average I use is instead a Hull type average (and the parameters are obviously not 20/10).

Important to note here: signal #1 is symmetric wrt 'buy' and 'sell'.

If used alone, signal #1 is profitable over the global bitcoin history (GX, BS, BF), and roughly uniformly profitable as well. However, it yields slightly too many trades, and tends to sell too early during major rallies. So, it is not the desired signal yet that only sells when it really has to.

Signal #2 is a short-term momentum signal. It acts as a filter applied to #1. Think of it as an "optimal entry/exit" filter. It cannot initiate additional trades by itself, it can only delay a trade based on signal #1. It is basically capturing the idea: if the medium term is up, but the short term is drastically down, better wait a bit before you buy (similar for delaying a sell trade). Signal #2 is buy/sell symmetric as well, and I don't really think it is problematic (also, leaving it out doesn't change the results from a pure signal #1 strategy much).

Signal #3 is the tricky one. You could call it the "bubble filter". Just like #2, it doesn't do anything other than (possibly) delay signals coming from #1, i.e. it doesn't add to the total number of trade signals but only *reduces* them under certain conditions.

It defines certain market conditions (think: long term momentum) to be so strongly bullish that a mid-term momentum signal from #1 that says 'sell' should be ignored for the moment, until either the mid term is up again, or the market condition becomes less bullish, in which case the 'sell' goes through.

And here's the tricky bit. Signal #3 is not buy/sell symmetric. It only delays 'sell' trades, but not 'buy' trades, in case the long term momentum is flipped around

I know. That buy/sell asymmetry is a big violation of all that is holy in algorithmic trading. Reeks of overfitting.

Still, given the history of the Bitcoin market so far, I can see some justification for it. It works well for 2011, 2012, 2013. In 2014, it still works well enough for the first half, but from then on, it's not really justified anymore.

I guess it all depends now if Bitcoin will ever go through a significant bull market again, and when. Let's say it does ("Bitcoin is dead" users need not reply Cheesy). That still doesn't mean that the exact parameters of the "bubble filter" are optimal, but it's probably not going to be the millstone around the algorithms neck that it is right now, delaying sell signals when it really shouldn't.

In a way, I'm making a human choice for my algorithmic method here: the assumption, that in the long run, it is better to err on the side of buying than on the side of selling - a choice that is justified by the global history of the market, but not by the more local one.

Comments welcome.

this space is intentionally left blank
oda.krell
Legendary
*
Offline Offline

Activity: 1386



View Profile
February 16, 2015, 05:31:12 PM
 #288

A pity I discovered this thread so late. Thanks a lot for the courage of sharing your ideas publicly.
It is not that easy task to create your own working strategy, first of all because you think of plethora of different signals that can be used and that you want to be used, secondly because the signals you have chosen may very well fit the historical data, with no guarantee that they will work in future - bringing you back to the point one, I believe, with the need to add some more signals and making the whole idea overly complex. That is where you are now, I believe.

Now, if I may suggest something is to check, if signal #1 has the long enough observation window? That is whether the medium term signal is enough to filter our major trend change and thus adjust the asymmetry of signal #3 accordingly.

Thanks Smiley

Not sure I understand your question correctly. Probably better to go through it based on the pseudocode I posted:

average-fast = f(x)
average-fast-sig = f'(x)

average-mid = g(x)
average-mid-sig = g'(x)

average-slow = h(x)
average-slow-sig = h'(x)

sig-1 := if average-mid > average-mid-sig, buy. if average-mid < average-mid-sig, sell.

sig-2 := if average-fast > average-fast-sig, buy. if average-fast < average-fast-sig, sell.

sig-3 := if average-slow < average-slow-sig, sell.

trade-signal := if sig-1 == sig-2 == sig-3 == sell, sell. if sig-1 == sig-2 == buy, buy. o/w, do nothing.

You're asking me if I could leave out sig-3 and get the same results?

No, of course not. Otherwise, I would have never introduced that asymmetry Tongue

Without sig-3 (slow), sig-1 alone (medium) is still quite profitable. Just that it is a lot more profitable together with the "bubble filter".

Not sure which Bitcoin wallet to use? I suggest to take a look at Electrum.
Electrum is an open-source lightweight client: user friendly, fast, and one of the safest ways to store, send or receive bitcoins.
For executables (Windows, OSX, Linux, Android), source code and documentation, see the Electrum homepage.
uki
Legendary
*
Offline Offline

Activity: 1176


cryptojunk bag holder


View Profile
February 16, 2015, 11:57:49 PM
 #289

what I meant with the statement below:
Now, if I may suggest something is to check, if signal #1 has the long enough observation window? That is whether the medium term signal is enough to filter our major trend change and thus adjust the asymmetry of signal #3 accordingly.
is whether your medium term filter should not be enhanced with a long-term one that would indicate you whether in the long term you are in the bear or bull market and then modify your signal 3 accordingly: being in the long term bear you would be only buying if additionally signal #3 indicates so. Moving to your pseudo-code that would mean:

Code:
sig-0=: if average-long > average-long-sig, bull. if average-long < average-long-sig, bear.

bull: keep your current code
bear: provide symmetric modification to sig-3

Otherwise you may be trapped in a situation you have long-term bear, but a mid-term bull (a false break-out to the upside).
or did I get it wrong?

this space is intentionally left blank
oda.krell
Legendary
*
Offline Offline

Activity: 1386



View Profile
February 17, 2015, 11:54:20 AM
 #290

what I meant with the statement below:
Now, if I may suggest something is to check, if signal #1 has the long enough observation window? That is whether the medium term signal is enough to filter our major trend change and thus adjust the asymmetry of signal #3 accordingly.
is whether your medium term filter should not be enhanced with a long-term one that would indicate you whether in the long term you are in the bear or bull market and then modify your signal 3 accordingly: being in the long term bear you would be only buying if additionally signal #3 indicates so. Moving to your pseudo-code that would mean:

Code:
sig-0=: if average-long > average-long-sig, bull. if average-long < average-long-sig, bear.

bull: keep your current code
bear: provide symmetric modification to sig-3

Otherwise you may be trapped in a situation you have long-term bear, but a mid-term bull (a false break-out to the upside).
or did I get it wrong?

Nice. Get what you're asking now.

The Answer is: yes. I have such a 'ultra-long term modifier' (sig-0) that I could use to make the algorithm fully symmetric wrt buy and sell Smiley

The problem? That signal switched exactly once so far (in mid 2014), so I have very little certainty that it is not just an arbitrarily fitted parameter combination.

Still, at least if would be a condition that can be met (or not) based on the market data, while right now, the "bubble filter" (EDIT that makes the final trade signal "lean towards bullish") is permanently on.

Not sure which Bitcoin wallet to use? I suggest to take a look at Electrum.
Electrum is an open-source lightweight client: user friendly, fast, and one of the safest ways to store, send or receive bitcoins.
For executables (Windows, OSX, Linux, Android), source code and documentation, see the Electrum homepage.
sidhujag
Legendary
*
Offline Offline

Activity: 1638


View Profile
February 21, 2015, 06:41:30 AM
 #291

I find tls are the way to go they are the earliest indicator.. best risk reward.. others either repaint or they get you in late.. you always have to have an exit or stoploss with any entry and its hard to with moving averged which are already late

True, but: how do you backtest a discretionary strategy (based on trendline estimations, among others)?

There's no way around the following dilemma:

Using the full range of human intuition, pattern recognition and, well, intelligence, yields "discretionary trading". Quite possible the most profitable way to trade, but also the hardest one to estimate, quantitatively, if and how profitable it is.

Algorithmic trading is a reduction of the above in terms of available algorithms (not everything a human can do can be implemented as a TM), it gives some additional capacity however (crunching big data), and it comes with a boon: running the algorithm on historical data to estimate performance.

I'm dismissing neither. Both are valuable tools. I just reject any easy answer that says "only algo trading works", or "only discretionary trading gives good results". Both answers would be missing the trade-off involved in this decision, imo.

We are irrational and charts become irrational thus I find that algo trading really only works if you have no spread (working at a bank) and do arbs all day or frontrun iceberg orders.. but not on higher tfs because physcology is always changing..

Our core thought process is a cycle and thus you see patterns repeat but they happen randmwly almost.. neural networks almost get usthere but they will overtrain..

So best method is your mind... after 10k hrs you will know whats next on intuition based on patterns and news. If you map the variables your algo will break next week so your method needs to keep adapting.. this is why most ppl fail at trading.. i stopped because I get too greedy and lose sight of big picture. I can see price but i wont trade it. I know I have an edge but the emotional part is the beast within me.. maybe one day Ill try it again.

All u need is a 1% edge to become wildly rich.. just that u need to know that in order to devise a plan.. rather than expect to win everytime..

Im sure if you automate your though process u can get the 1% and evolve ur logic over time.. the money management is what will let u keep going (dont get greedy) its a marathon not a spring.

Black swans will always happen though.. that is the risk of any market. It will get you so i beg to question wether it is just gambling or not.. make a million and get out.. but get out to what? Every market has swan events? Maybe ur luck and a little bit of smart guessing helps here..

Ie: The swiss currency move caught ppl offgaurd.. there was no way to close your long as no liquidity present.. ur margin was sucked dry.. those that were lucky or had inside info struck it rich.. but most didnt.. no money management would have helped here you are at the mercy of the environment.

★☆★Syscoin - Decentralized Marketplace and Multisig Platform
Pay with Bitcoin, ZCash and many more
For more visit Syscoin.org  ★☆★
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 [15]  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!