HOME FORUMS BROKERS SOFTWARE BOOKS CONTACT US
Elite Trader Your Account  •  Become a Member  •  Help  •  Search    
    Forums ›› Technically Speaking ›› Technical Analysis ›› Using YASAI for Monte Carlo  


Post A Reply
    Page 1 of 2:   1  2  
feng456
 

Registered: May 2010
Posts: 266

 

12-27-11 11:57 PM

ok im trying to figure out how to do monte carlo analysis...

lets say i have the following:

Jan 2011
5 pts
-5
5
-5
5
5
Total: 10 pts

Feb 2011
5 pts
-5
5
5
Total: 10 pts

March 2011

5
-5
-5
-5
-5
Total: -15 pts

how would i use YASAI to run monte carlo on this?

    Edit/Delete Quote Complain
abattia
 

Registered: Dec 2008
Posts: 983

 

12-28-11 07:25 AM

I would do this as follows (there may be other ways to do it, too)…

Your example has 15 trades;
8 winners (each @ +5);
7 losers (each @ -5)
-> Prob of winning = 8/15
[BTW, Feb total is +15 pts, not +10 pts]

Your worksheet needs 4 columns

Column A
Cell A1: “Trade”
Cell A2: 1
Cell A3: 2
Cell A4: 3
.
.
Cell A16: 15

Column B
Cell B1: “Won/Lost”
Cell B2: =genBinomial(1,8/15)
Cell B3: =genBinomial(1,8/15)
.
.
Cell B16: =genBinomial(1,8/15)

Column C
Cell C1: “PnL”
Cell C2: =if(B2=1,5,-5)
Cell C3: =if(B3=1,5,-5)
.
.
Cell C16: =if(B16=1,5,-5)

Column D
Cell D1: “Total PnL”
Cell D2: =simOutput(SUM(C2:C16))


Now run the sim, and your results will be on a new tab.

    Edit/Delete Quote Complain
feng456
 

Registered: May 2010
Posts: 266

 

12-28-11 04:25 PM

Thank you very very much!

    Edit/Delete Quote Complain
abattia
 

Registered: Dec 2008
Posts: 983

 

12-30-11 10:59 AM


feng456 wrote on 12-29-11 11:25 PM:
hey thanks for your help with YASAI. I am wondering how I would do my PnL if it's not just +5 / -5 (like with only 2 possibilities) but the target always changed depending on the trade?

so if i had

-5
-5
2
6
9
1
-5

how would i do the PnL for it for column C per your example?

thanks



Your worksheet needs 6 columns

Column A
Cell A1: =“Historical Trade”
Cell A2: =1
Cell A3: =2
.
.
Cell A8: =7

Column B
Cell B1: =“Historical PnL”
Cell B2: =-5
Cell B3: =-5
Cell B4: =2
.
.
Cell B8: =-5

Column C
Cell C1: =“Historical Frequency”
Cell C2: =1/7
Cell C3: =1/7
.
.
Cell C8: =1/7


Column D
Cell D1: =“Simulated Trade”
Cell D2: =1
Cell D3: =2
Cell D4: =3
.
.
Cell D8: =8


Column E
Cell E1: =“Simulated PnL”
Cell E2: =genTable(B$2:B$8,C$2:C$8)
Cell E3: =genTable(B$2:B$8,C$2:C$8)
.
.
Cell E8: = genTable(B$2:B$8,C$2:C$8)

Column F
Cell F1: =“Total Simulated PnL”
Cell F2: =simOutput(SUM(E2:E8))


Now run the sim, and your results will be on a new tab.

    Edit/Delete Quote Complain
feng456
 

Registered: May 2010
Posts: 266

 

12-30-11 03:02 PM

Thanks very much again. I did try to do it first but nothing came up because well it was totally wrong.

    Edit/Delete Quote Complain
abattia
 

Registered: Dec 2008
Posts: 983

 

12-31-11 07:41 AM



feng456 wrote on 12-31-11 12:56 AM:
i just used the formulas you gave me and it didnt work. there was no distribution and no chart at all. i checked to make sure i followed your instructions exact



It's working for me. Not sure what you are doing differently...
a) NB - content of cell D8 should be 7 (not 8, as I wrote), but that shouldn't make a difference to your simulation
b) check again Columns B, C, E & F against what I wrote; the problem will lie somewhere there, I suspect

Good luck! Hope you can sort it out!

    Edit/Delete Quote Complain
    Page 1 of 2:   1  2  
Post A Reply


Receive an email whenever a new post is added to this thread by subscribing to it.
 
Rate This Thread:

Forum Jump:
 

 

   Conduct Rules  -  Privacy Policy  -  Day Trader -  Day Trader Forum -  Best Trading Software -  Sitemap Copyright © 2013, Elite Trader. All rights reserved.    
 
WHILE YOU'RE HERE, TAKE A MINUTE TO VISIT SOME OF OUR SPONSORS:
Advantage Futures
Futures Brokerage & Clearing
AMP Global Clearing
Futures and FX Trading
Bright Trading
Professional Equities Trading
CTS
Futures Trading Software
DaytradingBias.com
Professional Trading Analytics
ECHOtrade
Professional Trading Firm
eSignal
Trading Software Provider
FXCM
Forex Trading Services
Global Futures
Futures, Options & FX Trading
Interactive Brokers
Pro Gateway to World Markets
JC Trading Group
Direct Access Trading
MB Trading
Direct Access Trading
MultiCharts
Trading Software Provider
NinjaTrader
Trading Software Provider
OANDA
Currency Trading
optionshouse
Option Trading & Education
Rithmic
Futures Trade Execution Platform
SpeedTrader
Direct Access Trading
SpreadProfessor
Spread Trading Instruction
thinkorswim by TD Ameritrade
Direct Access TradingAdvertisement
TradersStudio
System Building & Backtesting
Trading Technologies
Trading Software Provider
Trend Following
Trading Systems Provider