Bitcoin Forum
March 29, 2024, 01:21:01 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Perfect Position Sizing | WSC Team  (Read 3665 times)
alpha492 (OP)
Full Member
***
Offline Offline

Activity: 195
Merit: 100


View Profile
January 29, 2014, 09:09:15 PM
Last edit: January 29, 2014, 10:08:39 PM by alpha492
 #1

Written by Ryan Sanden

Presented by WallStreetCrypto

For those of you who enjoyed our article 'Mitigating Risk, the Only Thing You Need to Know!', you'll love this one.
Ryan Sanden offers an entirely new, custom approach to quantifying exact position sizing applicable to manual traders and bots.  For those with a background in math he not only goes over basic formula usage but offers a logical derivation of his original formula.

This article offers a must know, essential truth of trading that really drives home an enlightening point.

http://www.wallstreetcrypto.net/2014/01/perfect-position-sizing.html

Enjoy!

1711675261
Hero Member
*
Offline Offline

Posts: 1711675261

View Profile Personal Message (Offline)

Ignore
1711675261
Reply with quote  #2

1711675261
Report to moderator
Be very wary of relying on JavaScript for security on crypto sites. The site can change the JavaScript at any time unless you take unusual precautions, and browsers are not generally known for their airtight security.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1711675261
Hero Member
*
Offline Offline

Posts: 1711675261

View Profile Personal Message (Offline)

Ignore
1711675261
Reply with quote  #2

1711675261
Report to moderator
alpha492 (OP)
Full Member
***
Offline Offline

Activity: 195
Merit: 100


View Profile
January 30, 2014, 07:24:29 AM
 #2

great read man, easy way to explain, thats a must,

Thanks glad you enjoyed it, if your interested at all I'm working on a plug and play excel spread for Ruien's formula.

Hopefully you should be able to put in a few trades you made and it will spit out your optimum position size.

oda.krell
Legendary
*
Offline Offline

Activity: 1470
Merit: 1007



View Profile
January 30, 2014, 03:52:18 PM
 #3

Was relatively unimpressed in the beginning, thinking "what a tosser -- rediscovering the Kelly criterion and then slapping his own name on it", but luckily I read it to end and noticed he's addressing that question, pointing out they're subtly different. Will have to read it more carefully later and will report back Smiley

Not sure which Bitcoin wallet you should use? Get Electrum!
Electrum is an open-source lightweight client: fast, user friendly, and 100% secure.
Download the source or executables for Windows/OSX/Linux/Android from, and only from, the official Electrum homepage.
oda.krell
Legendary
*
Offline Offline

Activity: 1470
Merit: 1007



View Profile
January 30, 2014, 08:00:42 PM
 #4


Alright. Read it a bit more carefully. Makes sense to me, even though I'm not completely sure if the original Kelly formula doesn't cover his case (outcomes other than double-or-none and risk size greater than 1) as well, by relatively straightforward modification, in which case I'm not sure if the rename was completely appropriate, but that's maybe nitpicking. It was an interesting read, for sure.

Here's a little observation how to apply the 'generalized Kelly'/'Sanden criterion' for different trading assumptions:

Starting from the assumption you're 100% in USD, and that your goal is to make a USD profit, let's say you give it equal chances that USD/BTC will go up by P% or down by P%. Applying the criterion we non-surprisingly get

(0.5)/(P) - (1-0.5)/P

which reduces to 0. In other words, don't trade at all if you don't know where price is going.

But now assume for a moment you're 100% in BTC, and your goal is to maximize your total of BTC. This only makes sense of course if you're willing to accept a (short term) USD loss, and is based on the assumption that in the very long run, USD/BTC will go much higher and you want to increase your coin stash as much as possible.

Then the calculation becomes one of "selling BTC now to rebuy cheaper later or not". Say again we assume with equal likelihood that USD/BTC goes up P% or down P%. If price goes up, you made a BTC loss, more precisely: you rebuy for 1/1+P, which means your new BTC total is 1-(1/1+P) as percentage of your previous BTC total. Similar for the case where your trade is BTC profitable and price goes down.

But you can already see where I'm going with this: for example, price going down 50% and rebuying means your BTC total doubles, while price going up 50% and rebuying (at a BTC loss) means your BTC total is reduced by only 1/3.

Using the criterion formula, we get

(1/2)/(1-(1/(1+P))) - (1-1/2)/((1/(1-P))-1)

which reduces to... 1.

100% of your position.[1]


So, the conclusion would be that, if you are a long term BTC maximizer (what user Rampion once called the "land grabbing" strategy), then it makes sense to sell your entire coin stash relatively quickly, on a "whim" so to speak, as long as you're conviced that the possible upside potential of USD/BTC (on a short/medium term swing) is identical on to the potential downside potential during that swing.


I'll leave it up to the reader if that really makes sense as a strategy. Note please that this doesn't mean the criterion itself is mathematically wrong: the thing to keep in mind is that Kelly (and Sanden) define the maximum size you should risk to maximize profit, but for independent reason[2] it might well be more sensible to stay below that maximum.


* * *


[1] If I made a thinking mistake somewhere, let me know please. Although I went through it again, and it looks right to me: it's basically a mildly surprising (to me at least) consequence if you don't measure profit in the unit that undergoes change P% (USD, in the first example), but in BTC.

[2] Such as: It's possible that when we think chances are 50/50 that price goes up or down by equal percent, you're actually systematically misjudging the market. It's certainly a thought I have quite often ("to me it looks like it could go up 10% or down 10% with equal likelihood"), but that doesn't mean I am justified in that belief. Could be a systematic cognitive bias I need to take into account.


Not sure which Bitcoin wallet you should use? Get Electrum!
Electrum is an open-source lightweight client: fast, user friendly, and 100% secure.
Download the source or executables for Windows/OSX/Linux/Android from, and only from, the official Electrum homepage.
sgbett
Legendary
*
Offline Offline

Activity: 2576
Merit: 1087



View Profile
January 30, 2014, 08:13:17 PM
 #5


So, the conclusion would be that, if you are a long term BTC maximizer (what user Rampion once called the "land grabbing" strategy), then it makes sense to sell your entire coin stash relatively quickly, on a "whim" so to speak, as long as you're conviced that the possible upside potential of USD/BTC (on a short/medium term swing) is identical on to the potential downside potential during that swing.


http://www.youtube.com/watch?v=7qnd-hdmgfk

"A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution" - Satoshi Nakamoto
*my posts are not investment advice*
alpha492 (OP)
Full Member
***
Offline Offline

Activity: 195
Merit: 100


View Profile
January 30, 2014, 08:57:25 PM
 #6


Alright. Read it a bit more carefully. Makes sense to me, even though I'm not completely sure if the original Kelly formula doesn't cover his case (outcomes other than double-or-none and risk size greater than 1) as well, by relatively straightforward modification, in which case I'm not sure if the rename was completely appropriate, but that's maybe nitpicking. It was an interesting read, for sure.

Here's a little observation how to apply the 'generalized Kelly'/'Sanden criterion' for different trading assumptions:

Starting from the assumption you're 100% in USD, and that your goal is to make a USD profit, let's say you give it equal chances that USD/BTC will go up by P% or down by P%. Applying the criterion we non-surprisingly get

(0.5)/(P) - (1-0.5)/P

which reduces to 0. In other words, don't trade at all if you don't know where price is going.

But now assume for a moment you're 100% in BTC, and your goal is to maximize your total of BTC. This only makes sense of course if you're willing to accept a (short term) USD loss, and is based on the assumption that in the very long run, USD/BTC will go much higher and you want to increase your coin stash as much as possible.

Then the calculation becomes one of "selling BTC now to rebuy cheaper later or not". Say again we assume with equal likelihood that USD/BTC goes up P% or down P%. If price goes up, you made a BTC loss, more precisely: you rebuy for 1/1+P, which means your new BTC total is 1-(1/1+P) as percentage of your previous BTC total. Similar for the case where your trade is BTC profitable and price goes down.

But you can already see where I'm going with this: for example, price going down 50% and rebuying means your BTC total doubles, while price going up 50% and rebuying (at a BTC loss) means your BTC total is reduced by only 1/3.

Using the criterion formula, we get

(1/2)/(1-(1/(1+P))) - (1-1/2)/((1/(1-P))-1)

which reduces to... 1.

100% of your position.[1]


So, the conclusion would be that, if you are a long term BTC maximizer (what user Rampion once called the "land grabbing" strategy), then it makes sense to sell your entire coin stash relatively quickly, on a "whim" so to speak, as long as you're conviced that the possible upside potential of USD/BTC (on a short/medium term swing) is identical on to the potential downside potential during that swing.


I'll leave it up to the reader if that really makes sense as a strategy. Note please that this doesn't mean the criterion itself is mathematically wrong: the thing to keep in mind is that Kelly (and Sanden) define the maximum size you should risk to maximize profit, but for independent reason[2] it might well be more sensible to stay below that maximum.


* * *


[1] If I made a thinking mistake somewhere, let me know please. Although I went through it again, and it looks right to me: it's basically a mildly surprising (to me at least) consequence if you don't measure profit in the unit that undergoes change P% (USD, in the first example), but in BTC.

[2] Such as: It's possible that when we think chances are 50/50 that price goes up or down by equal percent, you're actually systematically misjudging the market. It's certainly a thought I have quite often ("to me it looks like it could go up 10% or down 10% with equal likelihood"), but that doesn't mean I am justified in that belief. Could be a systematic cognitive bias I need to take into account.



It seems like your assuming your chances of making a successful trade are arbitrarily assigned.  Its an experimental value that will be different for each trader/bot.

oda.krell
Legendary
*
Offline Offline

Activity: 1470
Merit: 1007



View Profile
January 30, 2014, 09:10:05 PM
Last edit: January 30, 2014, 09:22:50 PM by oda.krell
 #7


Alright. Read it a bit more carefully. Makes sense to me, even though I'm not completely sure if the original Kelly formula doesn't cover his case (outcomes other than double-or-none and risk size greater than 1) as well, by relatively straightforward modification, in which case I'm not sure if the rename was completely appropriate, but that's maybe nitpicking. It was an interesting read, for sure.

Here's a little observation how to apply the 'generalized Kelly'/'Sanden criterion' for different trading assumptions:

Starting from the assumption you're 100% in USD, and that your goal is to make a USD profit, let's say you give it equal chances that USD/BTC will go up by P% or down by P%. Applying the criterion we non-surprisingly get

(0.5)/(P) - (1-0.5)/P

which reduces to 0. In other words, don't trade at all if you don't know where price is going.

But now assume for a moment you're 100% in BTC, and your goal is to maximize your total of BTC. This only makes sense of course if you're willing to accept a (short term) USD loss, and is based on the assumption that in the very long run, USD/BTC will go much higher and you want to increase your coin stash as much as possible.

Then the calculation becomes one of "selling BTC now to rebuy cheaper later or not". Say again we assume with equal likelihood that USD/BTC goes up P% or down P%. If price goes up, you made a BTC loss, more precisely: you rebuy for 1/1+P, which means your new BTC total is 1-(1/1+P) as percentage of your previous BTC total. Similar for the case where your trade is BTC profitable and price goes down.

But you can already see where I'm going with this: for example, price going down 50% and rebuying means your BTC total doubles, while price going up 50% and rebuying (at a BTC loss) means your BTC total is reduced by only 1/3.

Using the criterion formula, we get

(1/2)/(1-(1/(1+P))) - (1-1/2)/((1/(1-P))-1)

which reduces to... 1.

100% of your position.[1]


So, the conclusion would be that, if you are a long term BTC maximizer (what user Rampion once called the "land grabbing" strategy), then it makes sense to sell your entire coin stash relatively quickly, on a "whim" so to speak, as long as you're conviced that the possible upside potential of USD/BTC (on a short/medium term swing) is identical on to the potential downside potential during that swing.


I'll leave it up to the reader if that really makes sense as a strategy. Note please that this doesn't mean the criterion itself is mathematically wrong: the thing to keep in mind is that Kelly (and Sanden) define the maximum size you should risk to maximize profit, but for independent reason[2] it might well be more sensible to stay below that maximum.


* * *


[1] If I made a thinking mistake somewhere, let me know please. Although I went through it again, and it looks right to me: it's basically a mildly surprising (to me at least) consequence if you don't measure profit in the unit that undergoes change P% (USD, in the first example), but in BTC.

[2] Such as: It's possible that when we think chances are 50/50 that price goes up or down by equal percent, you're actually systematically misjudging the market. It's certainly a thought I have quite often ("to me it looks like it could go up 10% or down 10% with equal likelihood"), but that doesn't mean I am justified in that belief. Could be a systematic cognitive bias I need to take into account.



It seems like your assuming your chances of making a successful trade are arbitrarily assigned.  Its an experimental value that will be different for each trader/bot.

That's not really an answer to my observation. Your objection applies to the first case I mention (goal: USD profit) just as well.

Also, whether you actually can "empirically" determine your chance of successful trades by looking at your previous ones is not at all obvious. How big do you demand the sample size to be before you're sure? Do you look at your previous, I don't know, 20 trades, see how many times you were right, and plug that in? Do you do calculate that as an absolute probability, or a conditional probability (like, "if I assume we're going up, I'm usually right, but if I think we're going down, I'm wrong n% of the time"). So "experimental value" is a pretty fuzzy term, and your intuition always plays a role in trading in the end, even if you're following a formal system.

My point was really pretty simple, and independent of whether your assumptions about the market direction have been historically correct or not:

If you trade to make a USD profit, an "uncertain" situation as defined above (50/50 chance that price goes equal percentage up/down) is a no trade.

If you trade to make a BTC profit (because you assume that long term you should maximize your BTC position), the same "uncertainty" actually becomes a strongly encouraged trade.

That's, to me at least, noteworthy.


(EDIT added a paragraph)

Not sure which Bitcoin wallet you should use? Get Electrum!
Electrum is an open-source lightweight client: fast, user friendly, and 100% secure.
Download the source or executables for Windows/OSX/Linux/Android from, and only from, the official Electrum homepage.
alpha492 (OP)
Full Member
***
Offline Offline

Activity: 195
Merit: 100


View Profile
January 30, 2014, 11:28:19 PM
 #8



Also, whether you actually can "empirically" determine your chance of successful trades by looking at your previous ones is not at all obvious. How big do you demand the sample size to be before you're sure? Do you look at your previous, I don't know, 20 trades, see how many times you were right, and plug that in? Do you do calculate that as an absolute probability, or a conditional probability (like, "if I assume we're going up, I'm usually right, but if I think we're going down, I'm wrong n% of the time"). So "experimental value" is a pretty fuzzy term, and your intuition always plays a role in trading in the end, even if you're following a formal system.

My point was really pretty simple, and independent of whether your assumptions about the market direction have been historically correct or not:

If you trade to make a USD profit, an "uncertain" situation as defined above (50/50 chance that price goes equal percentage up/down) is a no trade.

If you trade to make a BTC profit (because you assume that long term you should maximize your BTC position), the same "uncertainty" actually becomes a strongly encouraged trade.

That's, to me at least, noteworthy.


(EDIT added a paragraph)

There's some obvious limitations to any mathematical model pertaining to markets/trading, that have been discussed and explored for ages.  As for sample size, if you look at the derivation the entire formula (and most positions sizing formulas for that matter) is just a successive approximation.  Technically there is no sample size that will ever be large enough to achieve 100% accuracy, however a sample of 20 or more trades should yield useful results.  The same logic applies for the number of variables you take into consideration, you can account for infinitely many.  Was the position short?  Was the position long?  What time of day was the trade made?  Did you get in an argument with your wife that day?  Did you need to pee while you entered the position.

So I guess the answer to your question is; like all mathematical models this one accounts for the variables it needs to.  There is no 'optimal' sample size (and never will be with any calculus problem) but as far as a minimum sample size, this is actually something I"m trying to quantify in the spreadsheet mentioned above.

I used to have a chemistry teach (who I think was quoting an economist) that would always say

"All models are wrong, some models are useful"

MoreFun
Legendary
*
Offline Offline

Activity: 1008
Merit: 1003


WePower.red


View Profile
January 31, 2014, 12:01:11 AM
 #9

Oda.krell that should be true what you are saying that odds are greatly into you if you want to increase BTC position. But remember that these odds are into you just because you believe (risk at the same time), that BTC will be sometime worth more than you paid for it when you bought it back when it went down.

1BTC * $1000 = 2BTC * $500 = 0.666BTC * $1.500
alpha492 (OP)
Full Member
***
Offline Offline

Activity: 195
Merit: 100


View Profile
February 04, 2014, 01:44:20 AM
 #10

According to ruien (author of the article and formula)

'a good rule of thumb is that you can start once you have as few as about 30 trades, but you need to scale down the risk a lot until you have 100 trades, because before about 100 trades the margin of error of your statistics could be wrong'

This conclusion was reached via http://www.surveysystem.com/sscalc.htm#one with a 95% confidence level and a 10% margin of error

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!