Chcete-li používat chat, přihlaste se.
Zpět na Kontakty

Monte Carlo based EA

gatornuke
Jul 20 2011 at 20:45
32 příspěvků
Hello World!

I've developed a Monte Carlo based EA and have been testing it for some time. This EA uses price statistics to assemble sampling functions that are then used to produce a Monte Carlo simulation of the market on every new bar. The standard deviation from the Monte Carlo simulation can also be used to size positions and extablish TP and SL levels based on any given risk appetite. You can take a look at the experimental history at https://www.myfxbook.com/portfolio/mcnp-ea/138452, although by itself it won't tell you much. You'll also want to take a look at the description and setup of each experiment at my blog at gatornuke.com

I welcome any comments or questions.
fantasykid
Jul 21 2011 at 05:20
13 příspěvků
I have view everything on your blog as well watch your live stream. Very intertesting. I have seen an indicator that shows a guess trend before but never seen it in an EA... Will be watching this blog... Nice results.. seems to good. But what is your stop loss and take profit?
Quick in..... Quick out!!! I don't bite I scalp!!!
gatornuke
Jul 21 2011 at 22:03
32 příspěvků
Yeah, coding these graphics in an EA was not straightforward, but it really adds a lot of value to me. I'm a very visual person and just had to see what the EA was thinking.

The stop loss and TP are currently set at 2 standard deviations from the projected price (95.4% confidence interval). They're the red and blue lines you're seeing in the broadcast. Position size is based on these levels, so that every entry is risking a predetermined percentage of capital. I'm currently using 0.002% per entry and a maximum of 5000 entries, for a total maximum of 10% of capital at risk at any given time. Although I should mention the current EA rarely places more than a hundred or so entries at a time, so it doesn't get anywhere close to that. Also, the bottom two charts are running with no TP and SL just to see what happens.

As you may have noticed, today upon release of the EcoFin Meeting minutes there was a nice jump in the EURUSD. This triggered a number of short entries in the EA. I've noticed that this EA likes to work as more of a spike trader fading the market, as opposed to the other EAs I've tested. This nonetheless seems to work fairly well most of the time, but during big news announcements the price tends to make big moves regardless of the statistical background, and it this EA takes a good beating. I've been allowing this to happen and just witnessing the periodic bloodshed so as not to interfere with the scientific method, but I think the next testing iteration will include a subroutine to disallow entries during important news announcement such as speeches by Bernanke, FOMC/EcoFin minutes, GDP numbers, NFP, etc.
fantasykid
Jul 22 2011 at 22:32
13 příspěvků
Going into Monday well see a lot of movement in the EURUSD... I wonder if you could keep the EA from acting on its triggers if there is a big move in one direction in a short amount of time? Just a thought. Does the EA keep in a trade until the triggers are stopped out or does it get out at a predefined amount of time. Also what is your MM (Money Mangement) belief? Not what is built in to your EA but you personally. I am starting to find out that just lucky guessing in trading but a MM is very important to trading as well. So with your live feed why you have so many of the same screens? 😎
Quick in..... Quick out!!! I don't bite I scalp!!!
gatornuke
Jul 23 2011 at 04:06
32 příspěvků
both... There are a total of 6 versions running concurrently in the current experiment, which are the 6 screens you see. The column on the right has positions that will close after 2 hours no matter what, The first row also exits on SL/TP, or when the bias is gone, the second row exits on TP/SL or opposite entry, and the third row does the same as the second, but no SL/TP.

Hope that made sense. Again, these are just tests at this point. Once I'm comfortable that I'm getting good, consistent results, it'll be time to move on to a proof of principle test. I may get there in a couple of months or so.

As for MM, I try to follow the Kelly criterion, which is Winning Probability + [(Winning Probability-1) / Win-to-Loss Ratio]. You can obtain these values after trading for a while, and Kelly will give you the most you should bet as a percentage of principal on every trade. Most people would consider half Kelly to be prudent.

I also went ahead and coded a news avoidance subroutine. Now the question is do i just avoid High importance news, or medium as well? And for how long do I suppress trading? 30 minutes prior? 2 hours after? more? less?
I guess I'll go with -30/+120, medium/high for now and see how it goes.


James_Bond
Jul 25 2011 at 16:43
556 příspěvků

gatornuke posted:
    both... There are a total of 6 versions running concurrently in the current experiment, which are the 6 screens you see. The column on the right has positions that will close after 2 hours no matter what, The first row also exits on SL/TP, or when the bias is gone, the second row exits on TP/SL or opposite entry, and the third row does the same as the second, but no SL/TP.

Hope that made sense. Again, these are just tests at this point. Once I'm comfortable that I'm getting good, consistent results, it'll be time to move on to a proof of principle test. I may get there in a couple of months or so.

As for MM, I try to follow the Kelly criterion, which is Winning Probability + [(Winning Probability-1) / Win-to-Loss Ratio]. You can obtain these values after trading for a while, and Kelly will give you the most you should bet as a percentage of principal on every trade. Most people would consider half Kelly to be prudent.

I also went ahead and coded a news avoidance subroutine. Now the question is do i just avoid High importance news, or medium as well? And for how long do I suppress trading? 30 minutes prior? 2 hours after? more? less?
I guess I'll go with -30/+120, medium/high for now and see how it goes.




Did you post some screenshots? As I don't see any. If you didn't, then please do 😄
gatornuke
Jul 25 2011 at 20:40
32 příspěvků
Check out www.livestream.com/gatornuke. After the annoying commercial, give it a few seconds and you can see the live test broadcast.

And I've decided to go with -120/+120. That way i don't get caught with my pants down having open positions when a news event hits the market (at least in the expiring EAs).
James_Bond
Jul 26 2011 at 06:45
556 příspěvků

gatornuke posted:
    Check out www.livestream.com/gatornuke. After the annoying commercial, give it a few seconds and you can see the live test broadcast.

And I've decided to go with -120/+120. That way i don't get caught with my pants down having open positions when a news event hits the market (at least in the expiring EAs).

Just checked it out - quite hard to view it with the low resolution.
I've also checked your system in your portfolio - have you had positive results with backtests?
gatornuke
Jul 26 2011 at 13:13
32 příspěvků
Because the system uses Monte Carlo, it takes several seconds to produce a projection. It's impractical to do a backtest since it'll take close to as long to execute as a forward test, at least on the 1m timeframe. What you're seeing in the portfolio is the raw data from of all the testing. This testing was designed as a series of experiments, and the goal is not to make as much money as possible (that'll come later), but rather to experiment with various risk settings, different EA versions, and other settings and analyze the data. Check out the analysis at my blog (www.gatornuke.com) to put this data in context.
James_Bond
Jul 26 2011 at 17:55
556 příspěvků
Went over your blog - you're doing a heck of a job documenting it! You must be math guru to have created such ea's. 😲
gatornuke
Jul 26 2011 at 18:00
32 příspěvků
Thanks, but I'm not really a math guru. I just have a master's in nuclear engineering, which lends itself well to this approach. I just hope it pays off.
PipGnostic
TheCyclist
Jul 27 2011 at 07:56
724 příspěvků
Lol - that why the forex, be out of a job soon. World not so impressed with splitting the atom any more.

Does my nut why no one does sub sea tidal farms. Use tide shifts with subsea hydro turbines. Places like Taiwan 7 knot subsea currents 22 out of 24 hours...

It's predictable, it's green and we have the technology...
James_Bond
Jul 27 2011 at 09:55
556 příspěvků

gatornuke posted:
    Thanks, but I'm not really a math guru. I just have a master's in nuclear engineering, which lends itself well to this approach. I just hope it pays off.

😲

Than you're even smarter than I thought at first! 😄
TraderHotch
Jul 29 2011 at 08:53
9 příspěvků

TheCyclist posted:

Does my nut why no one does sub sea tidal farms. Use tide shifts with subsea hydro turbines. Places like Taiwan 7 knot subsea currents 22 out of 24 hours...

It's predictable, it's green and we have the technology...

Money. We'll get around to it eventually, but it needs to be more than economically viable, it needs to be a better investment than oil. So first we wait for the oil to run out. :D
Life getting tough? God fears your progress.
PipGnostic
TheCyclist
Jul 29 2011 at 12:23
724 příspěvků
Going to run out of nature looooong before we run out of oil....
TraderHotch
Jul 29 2011 at 12:58
9 příspěvků
Not really, everything's natural!
Life getting tough? God fears your progress.
PipGnostic
TheCyclist
Jul 29 2011 at 13:17
724 příspěvků
Yup - including mass extinctions....'bout 10 000 000 central Africans are finding that out the hard way even as I type this.

Imagine an event like that hits Asia, which it almost did last year. Have 100's of millions on the move....

TraderHotch
Jul 29 2011 at 14:29
9 příspěvků
I'm not arguing with you, just correcting your wording and saying that, while I think we should go balls out for green tech, I don't think we will soon.
Life getting tough? God fears your progress.
PipGnostic
TheCyclist
Jul 30 2011 at 00:30
724 příspěvků
Not so sure, weather last six months been so extreme and everyone is being affected. With the tsunami pointing a big finger at nuclear as dangerous, and with the weather doing what it's doing, it seems people are suddenly going to realise climate change is here to stay and it's going to affect everyone, and nuclear isn't the answer.

Might see a big green push in our lifetimes still I would guess.

Same thing happened to lead and CFC's, once the problem was understood and some consequences arrived the entire world took action to solve it. And they did.

All we need now is a few natural disasters in the developed world and things will change rapidly from the bottom up.
PipGnostic
TheCyclist
Jul 30 2011 at 00:50
724 příspěvků
US is actually overdue for quite a few.

San Andreas is over due, tsunami's (sub sea land slides) in California overdue, hurricane in New York....
Pokud chcete komentovat, přihlaste se .