NexusFi: Find Your Edge


Home Menu

 





How advanced mathematics and gaming theory can help you as a trader


Discussion in Psychology and Money Management

Updated
      Top Posters
    1. looks_one Fat Tails with 58 posts (127 thanks)
    2. looks_two RM99 with 18 posts (27 thanks)
    3. looks_3 worldwary with 10 posts (19 thanks)
    4. looks_4 Nickemp with 7 posts (15 thanks)
      Best Posters
    1. looks_one MXASJ with 3.5 thanks per post
    2. looks_two Fat Tails with 2.2 thanks per post
    3. looks_3 worldwary with 1.9 thanks per post
    4. looks_4 RM99 with 1.5 thanks per post
    1. trending_up 64,738 views
    2. thumb_up 290 thanks given
    3. group 65 followers
    1. forum 204 posts
    2. attach_file 16 attachments




 
Search this Thread

How advanced mathematics and gaming theory can help you as a trader

  #111 (permalink)
 
jungian's Avatar
 jungian 
Ontario
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus/ZF
Trading: ES, 6E, CL
Posts: 97 since Aug 2009
Thanks Given: 88
Thanks Received: 270

ENJOY!

Gambler's Ruin Java Applet

This applet simulates a gambler who repeatedly bets $10, until he either loses by going broke, or wins by doubling his initial fortune (Init).

The applet accepts the following keyboard inputs. (You may need to "click" on the applet first.)
  • Use the numbers '0' through '9' to set the animation speed level higher or lower.
  • Use 'r' to restart the simulation, or 'z' to zero the Win/Loss counts.
  • Use '>' and '<' to increase/decrease the win probability of each bet. (Possible values include 0.492929 [the probability of winning at craps] and 0.473684 [the probability of winning at roulette] plus various other values like 0.333333, 0.4, 0.45, 0.49, 0.495, 0.499, 0.4999, and 0.5.)
  • Use '+' and '-' to increase/decrease the initial fortune by $10 (and restart). Or, use 'T' or 'H' or 'G' or 'F' to set the initial fortune to $10 or $100 or $1000 or $5000, respectively.
  • Use 'A' to jump to $10 ahead of bankruptcy, or 'B' to jump to $10 behind victory.

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Cheap historycal L1 data for stocks
Stocks and ETFs
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
REcommedations for programming help
Sierra Chart
Quant vue
Trading Reviews and Vendors
What broker to use for trading palladium futures
Commodities
 
  #112 (permalink)
 
PositiveDeviant's Avatar
 PositiveDeviant 
United Kingdom
 
Experience: Intermediate
Platform: Multicharts
Trading: Dow
Posts: 587 since Nov 2010
Thanks Given: 257
Thanks Received: 256


Geomean View Post
Indeed, a resource on correlation coefficients would be most helpful.

Geo

This might be what you're looking for; www.impactopia.com

You need to register for the side-by-side correlations and some other features, but it's free to do so.


Impactopia
We consider here about 4,500 US equities traded on the NYSE, AMEX, and Nasdaq markets. In order to compare the price fluctuations of those equities, we compute the correlations for all possible pairs, i.e. about 10 million pairs. The engine developed by Impactopia helps sorting out the millions of correlation coefficients. A user can query the database for calculating lists of top correlated pairs of stocks, lists of anticorrelated pairs, and lists of correlated stocks to any equity.


Here's another one - www.aistockcharts.com

"The primary thing required to obtain what you want from life, is simply the will to pursue it, and the faith to believe it is possible." - Author Unknown

"The ability to maintain discipline and stick to the rules is the hallmark of the experienced successful trader" - Curtis Faith
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #113 (permalink)
KonQuistador
Dallas, TX
 
Posts: 11 since Feb 2011
Thanks Given: 2
Thanks Received: 4



RM99 View Post
Okay, so I thought I'd contribute a little bit of wisdom or at least food for thought.

What would you say, if I told you that you can make money on a mutually exclusive, binomial event such as flipping a coin (50% probability)?

It blows most peoples minds when I tell them this. Here are the conditions......A) You must have control over the wager amount, B) You must have a significant starting capital (say 100x the initial wager amount) and C) You must adhere to a strict diet of progressive betting strategy.

Here's how it works: Progressive betting requires that it be truly mutually exclusive and also requires inherent "strings" be present over a given sample of n events.

Take for instance, our coin flip example. If you have a data sampling of say 10,000 flips. Over the course of that entire data set, you will experience both positive and negative strings. The distribution will follow an exponential decay (i.e. there will be a very small number of long strings and there will be a very large number of short strings.) A typical distribution for strings might look like this......10 strings 1, 9 strings 3, 8 strings 7, 7 strings 15, etc.

Ever wonder why typical profit analysis tools show strings? Here's how to make it work.

If the event is truly mutually exclusive and binomial, over large samplings, you'd expect the number of winning strings to be similar (negligibly identical) to losing strings.


So, you bet initally 10 units. If the outcome is a win, you take 50% of the profit and leave the other half out as an additional wager increase. If the next outcome is positive, you do the same, take 50% and leave the rest, again upping your wager. When you lose, you restart the wager sequence back to the original wager/lowest increment.

So over a string of 5 wins (10 unit start bet)....it would yield 65.9375 units of profit and the same losing string would yield a loss of 50 units.

The key to progressive betting is inherent strings. The system fails and you actually lose money if there are no strings and it's simply a binary oscillator (i.e. win, loss, win, loss, win, loss, etc).

This is exactly how successful blackjack betting strategies are employed.

The second part of this segment is second order effects and how even with a 50% probability and a "player" using progressive betting will still end up losing.

Maybe this those have some merit to a degree. I live about 30 min. from Oklahoma so this last weekend me and the wife decide to take a small drive over to Oklahoma to check out the Wyns Casino. I don't know how to play any cards game such as blackjack or texas hold em. Slot machines are a waste in my opinion so my game of choice was roulette. My game plan was to watch all the numbers that had come up recently so I wrote down the #'s that had come up more than once . Then what I did I wrote numbers that had not come up at all. Then Ipaired numbers together. All this while the wheel kept on spinning and new numbers would come up. When I had up to six pairs of numbers I was ready to begin. I placed my wagers up to 5 chips covering pairs of #s that had been hot and the ones that were cold. At first I won three wagers at once and was like this works but then a string of losses came up that almost took me out. Just when I was about to lose all my money I had strings of wins again that put me where I started. In a span of three hours I played with the same money I began while I saw people come and lose everything. My plan was simple but changing constantly oh and I had no alcohol in me either. At the end of the night I ended up flat...which is better than losing. So my probabilties on that night were at 50/50

Reply With Quote
  #114 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


KonQuistador View Post
Maybe this those have some merit to a degree. I live about 30 min. from Oklahoma so this last weekend me and the wife decide to take a small drive over to Oklahoma to check out the Wyns Casino. I don't know how to play any cards game such as blackjack or texas hold em. Slot machines are a waste in my opinion so my game of choice was roulette. My game plan was to watch all the numbers that had come up recently so I wrote down the #'s that had come up more than once . Then what I did I wrote numbers that had not come up at all. Then Ipaired numbers together. All this while the wheel kept on spinning and new numbers would come up. When I had up to six pairs of numbers I was ready to begin. I placed my wagers up to 5 chips covering pairs of #s that had been hot and the ones that were cold. At first I won three wagers at once and was like this works but then a string of losses came up that almost took me out. Just when I was about to lose all my money I had strings of wins again that put me where I started. In a span of three hours I played with the same money I began while I saw people come and lose everything. My plan was simple but changing constantly oh and I had no alcohol in me either. At the end of the night I ended up flat...which is better than losing. So my probabilties on that night were at 50/50

If you play roulette, you have a negative expectancy. Your probabilities were less than 50/50. You simply did not play long enough to lose all your money.

In roulette there is no such thing as hot or cold numbers. Consecutive wheels runs are independent from each other, so the result of any run does not depend on the previous run.

Writing down numbers is a futile endeavor, as the outcome of the current run does not depend on previous runs. For further information check the "Gambler's Fallacy".

Reply With Quote
  #115 (permalink)
KonQuistador
Dallas, TX
 
Posts: 11 since Feb 2011
Thanks Given: 2
Thanks Received: 4


Fat Tails View Post
If you play roulette, you have a negative expectancy. Your probabilities were less than 50/50. You simply did not play long enough to lose all your money.

In roulette there is no such thing as hot or cold numbers. Consecutive wheels runs are independent from each other, so the result of any run does not depend on the previous run.

Writing down numbers is a futile endeavor, as the outcome of the current run does not depend on previous runs. For further information check the "Gambler's Fallacy".

I don't know I played for about 3 hours straight with the same money. I have done this technique before in vegas and it worked for me their as well until I started drinking....lol. Im not saying that your going to beat the system but in my experience your odds at winning do get better.

Reply With Quote
  #116 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


KonQuistador View Post
I don't know I played for about 3 hours straight with the same money. I have done this technique before in vegas and it worked for me their as well until I started drinking....lol. Im not saying that your going to beat the system but in my experience your odds at winning do get better.

Think about it again. Roulette is a sucker's game, because the only way to win is sheer luck.

Your "system" is funny, because it has no impact on the results.

It is like playing in a lottery. The odds are against you, but there will always be a winner.

Reply With Quote
  #117 (permalink)
 
whatnext's Avatar
 whatnext 
Rockland county , New York
 
Experience: Intermediate
Platform: NT 7
Trading: CL, 6E, SI, ZC
Posts: 230 since Mar 2011
Thanks Given: 338
Thanks Received: 81

I've heard that Craps is the only percentage based casino game where you can alter the odds in your favor.

It stems from having physical control over the die while throwing them. Gamblers have practiced rolling with a specific number on each die facing upwards and another facing either right or left.

Casinos must be wise to the method if it has really worked well for some.

Reply With Quote
  #118 (permalink)
KonQuistador
Dallas, TX
 
Posts: 11 since Feb 2011
Thanks Given: 2
Thanks Received: 4


Fat Tails View Post
Think about it again. Roulette is a sucker's game, because the only way to win is sheer luck.

Your "system" is funny, because it has no impact on the results.

It is like playing in a lottery. The odds are against you, but there will always be a winner.

Then im just a lucky man winning at a sucker's game... i like the sound of that.

Reply With Quote
Thanked by:
  #119 (permalink)
Geomean
Kansas City, MO USA
 
Posts: 4 since Apr 2011
Thanks Given: 1
Thanks Received: 7


Fat Tails View Post
Thanks for this post!

Could you post one example which explains, how you have adapted Optimal F to comply with larger drawdowns?

For me the position sizing that results from Optimal F is still too aggressive, so if you discovered with Optimal F that your position sizing was too large, what leverage did you use before?

I pasted at the end of this post an Excel analysis of DAG data created based on real time publicly published signals and results from a popular candlestick trading system.

I've calculated the Optimum f bet size using that data.

Let's say one has 100K capital.

The DAG optimum f% under that system when buying is 22.92%, for a bet size of $22,920.

Historically, the largest buy loss is -9.4% and 9.4% of $22,920 optimum f bet size is $2,154, or 2.154% of the assumed 100K equity.

Adjusting the max optimum f% loss of 2.154%/$22,920 = 1%/x makes the bet size $10,640

A 9.4% loss on $10,640 is $1000.16, or 1% of the 100K equity

Note that the max 1% drawdown limitation cut the bet sizing by more than half for both the long and short side signals.

A max drawdown bet size limitation is a real benefit when trading multiple asset classes simultaneously.

Using this kind of limitation and adding systems and instruments can get one closer to what Vince describes in his recent Leveraged Trading Space.

Good luck!

DAG AGRICULTURE DOUBLE LONG ETN KELLY ANALYSISAGA is the 2X inverse but has no volume DYY is another double long commodities ETF

# Trades58#Wins#Losses# BUYS34# Buy Wins26#Buy Losses8Total Buy Gain437Av BUY Gain0.079629015Av BUY Loss-0.034470462Largest Buy Loss-9.400%Long BUY Winning Probability (W)0.764705882Long BUY Win/Loss Ratio ("R")2.310065194Long (BUY) Only Kelly %0.662849832Arithmetic Expected Return1.531226325Optimal f22.92%Opt f x Largest Loss as % of acct value-2%1% Portfolio Loss Opt f x Largest Loss Limit Bet Size10.64%Variance in Holding Period Returns0.008609919Standard Deviation Actual HPR's (no stop)0.092789648Multiplicative Growth Function (sq rt A2-S2)1.528412294TWR15324290.13# SELLS38# SELL WINS23# SELL LOSSES11AV SELL GAIN5.879%AV SELL LOSS-4.294%LARGEST SELL LOSS-15.080%Short (Sell) Winning Proability (W)0.605263158Short (Sell) Win/Loss Ratio ("R"1.369Short(Sell) Only Kelly %31.6955%Arithmetic Expected Return43.40%Optimal f15%Opt f x Maximum loss as % of acct value-2.32%1% Portfolio Loss Opt f x Largest Loss Limit Bet Size6.63%Variance in Holding Period Returns0.005242327Standard Deviation Actual HPR's (no stop)7%Multiplicative Growth Function (sq rt A2-S2)43%TWR6.81462E-13

Reply With Quote
  #120 (permalink)
 
Arpad's Avatar
 Arpad 
Hungary
 
Experience: Beginner
Platform: N/A
Trading: Forex
Posts: 34 since Dec 2010
Thanks Given: 145
Thanks Received: 9



Fat Tails View Post
The Bet Size Modulator
The outcome of your bets are not influenced by or correlated to the bet size. If you have doubled your bet size this does not change the win rate of the following bet, so it just doubles your expectancy.

@Fat Tails,

This does not double your expectancy.

Expectancy =

(Average Profit * Probability of Winning) – (Average Loss * Probability of Losing)
–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
Average Risk amount (or Average Loss)

So your expectancy in your example is always 0.2, regardless of bet size.
Expectancy is a measure of your trading system, it is based on Win Rate and Reward:Risk ratio, nothing else. It has nothing to do with bet size or position size percent.

Reply With Quote
Thanked by:




Last Updated on April 18, 2020


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts