Two Plus Two Newer Archives

Two Plus Two Newer Archives (http://archives1.twoplustwo.com/index.php)
-   Business, Finance, and Investing (http://archives1.twoplustwo.com/forumdisplay.php?f=32)
-   -   S&P Trading Model - Quite Technical - Meet the Competition (http://archives1.twoplustwo.com/showthread.php?t=480540)

UrmaBlume 08-18-2007 09:23 AM

S&P Trading Model - Quite Technical - Meet the Competition
 
During the last week we have seen some very fast action in the equity and equity derivative markets. It probably won't come as much of a surprise to many to know that much of the trading action that drives these markets is executed by the online trading models used by international hedge funds and money center banks.

These models are quite complex, sometimes developed through genetic optimization, and they control the trading in hundreds of millions of shares and hundreds of thousands of equity derivative contracts around the world and around the clock.

Below is the actual code for one such model that is deployed to predict short term price for the S&P futures. Those familiar with basic technology can see at a glance that it is a working program but will not be able to discern the model inputs and thus the model can't be copied.

This particular model uses calculations from advances/declines, UpVol/DnVol, cash indexes and other sources. The model is run every 60 seconds and produces a fresh prediction every 60 seconds. As trading is different from hour to hour over the 24 hour trading day different models are developed for different time periods.

There are, of course, similar models for currency, debt and all other markets in operation today.

For online poker players with a technical background this is one place where bots are allowed and some of them earn billions for their owners and developers.

I am posting this code to give beginners an idea of the competition and stimulate discussion of technique amongst the more sophisticated traders here. Compare this to the code that drives such useless indicators as RSI, Stochastics and MACD. This is an example of one of my trading tools, what do you use?

Variables:BF1(0), BF2(0), BF3(0), BF4(0), BF5(0), BF6(0), BF7(0), BF8(0), BF9(0), BF10(0), BF11(0), BF12(0), BF14(0), BF15(0), BF16(0), BF17(0), BF18(0), BF19(0), BF20(0), BF21(0), BF22(0), BF23(0), BF25(0), BF26(0), BF27(0), BF28(0), BF29(0), BF30(0), BF32(0), BF33(0), BF34(0), BF37(0), BF38(0), BF39(0), BF40(0), BF41(0), BF42(0), BF44(0), BF45(0), BF47(0), BF48(0), BF49(0), BF50(0), BF51(0), BF52(0), BF53(0), BF55(0), BF56(0), BF57(0), BF58(0), BF59(0), BF60(0), BF61(0), BF62(0), BF63(0), BF64(0), BF66(0), BF67(0), BF68(0), BF69(0), BF70(0), BF71(0), BF72(0), BF73(0), BF74(0), BF75(0), BF77(0), BF78(0), BF79(0), BF81(0), BF83(0), BF86(0), BF87(0), BF88(0), BF90(0);

Variables:Fieldname1(0), Fieldname2(0), Fieldname3(0), Fieldname4(0), Fieldname5(0), Fieldname6(0), Fieldname7(0), Fieldname8(0), Fieldname9(0), Fieldname10(0), Fieldname11(0), Fieldname12(0), Fieldname13(0), Fieldname14(0), Fieldname15(0), Fieldname16(0), Fieldname17(0), Fieldname18(0), Fieldname19(0), Fieldname20(0), Fieldname21(0), Fieldname22(0), Fieldname23(0), Fieldname24(0), Fieldname25(0), Fieldname26(0), Fieldname27(0), Fieldname28(0);

Fieldname1 = aaaOBVPulse - aaaOBVPulse[3]; {OBV3}
Fieldname2 = aaaINXPulse - aaaINXPUlse[3]; {INX3}
Fieldname3 = aaaPulse500; {P500F}
Fieldname4 = aaaINXPulse; {INXP}
Fieldname5 = aaaDnVolPulse - aaaDnVolPulse[9]; {DNVOL9}
Fieldname6 = aaaOBVPulse; {OBVP}
Fieldname7 = aaaOEXPulse - aaaOEXPulse[9]; {OEX9}
Fieldname8 = aaaINXPulse - aaaINXPulse[9]; {INX9}
Fieldname9 = aaaPricePulse - aaaPricePulse[3]; {PRICE3}
Fieldname10 = aaaOBVinxTPulse - aaaOBVinxTPulse[9]; {OBVINXT9}
Fieldname11 = aaaINXPulse - aaaINXPulse[6]; {INX6}
Fieldname12 = aaaDnVolPulse; {DNVOLP}
Fieldname13 = aaaDecPulse; {DECP}
Fieldname14 = aaaDecPulse - aaaDecPulse[9]; {DEC9}
Fieldname15 = aaaPricePulse - aaaPricePulse[6]; {PRICE6}
Fieldname16 = aaaAdvPulse; {ADVP}
Fieldname17 = aaaAdvPulse - aaaAdvPulse[9]; {ADV9}
Fieldname18 = aaaTickPulse; {TICKP}
Fieldname19 = aaaTickPulse - aaaTickPulse[6]; {TICK6}
Fieldname20 = aaaUpVolPulse; {UPVOLP}
Fieldname21 = aaaTrinPulse - aaaTrinPulse[9]; {TRIN9}
Fieldname22 = aaaTrinPulse - aaaTrinPulse[6]; {TRIN6}
Fieldname23 = aaaOBVinxTPulse - aaaOBVinxTPulse[6]; {OBVINXT6}
Fieldname24 = aaaOBVinxTPulse; {OBVINXP}
Fieldname25 = aaaPricePulse; {PRICEP}
Fieldname26 = aaaUpVolPulse - aaaUpVolPulse[6]; {UPVOL6}
Fieldname27 = aaaTrinPulse - aaaTrinPulse[3]; {TRIN3}
Fieldname28 = aaaAdvPulse - aaaAdvPulse[6]; {ADV6}
BF1 = MaxList(0, Fieldname1 -41.46400);
BF2 = MaxList(0, -Fieldname1 +41.46400);
BF3 = MaxList(0, Fieldname2 +40.38000);
BF4 = MaxList(0, -Fieldname2 -40.38000);
BF5 = MaxList(0, Fieldname3 -1423.74805) * BF2;
BF6 = MaxList(0, -Fieldname3 +1423.74805) * BF2;
BF7 = MaxList(0, Fieldname4 -94.52000) * BF6;
BF8 = MaxList(0, -Fieldname4 +94.52000) * BF6;
BF9 = MaxList(0, Fieldname5 +137.72099) * BF2;
BF10 = MaxList(0, -Fieldname5 -137.72099) * BF2;
BF11 = MaxList(0, Fieldname6 +19.12000) * BF10;
BF12 = MaxList(0, -Fieldname6 -19.12000) * BF10;
BF14 = MaxList(0, -Fieldname4 -44.36000) * BF1;
BF15 = MaxList(0, Fieldname4 -0.58000) * BF2;
BF16 = MaxList(0, -Fieldname4 +0.58000) * BF2;
BF17 = MaxList(0, Fieldname7 -82.18800) * BF16;
BF18 = MaxList(0, -Fieldname7 +82.18800) * BF16;
BF19 = MaxList(0, Fieldname8 +32.94000) * BF9;
BF20 = MaxList(0, -Fieldname8 -32.94000) * BF9;
BF21 = MaxList(0, Fieldname9 -89.50000) * BF15;
BF22 = MaxList(0, -Fieldname9 +89.50000) * BF15;
BF23 = MaxList(0, Fieldname10 +65.33300) * BF10;
BF25 = MaxList(0, Fieldname3 +1734.56897);
BF26 = MaxList(0, -Fieldname3 -1734.56897);
BF27 = MaxList(0, Fieldname11 -87.62000) * BF25;
BF28 = MaxList(0, -Fieldname11 +87.62000) * BF25;
BF29 = MaxList(0, Fieldname12 +33.25200) * BF3;
BF30 = MaxList(0, -Fieldname12 -33.25200) * BF3;
BF32 = MaxList(0, -Fieldname13 -97.06701) * BF30;
BF33 = MaxList(0, Fieldname14 +1.93300) * BF6;
BF34 = MaxList(0, -Fieldname14 -1.93300) * BF6;
BF37 = MaxList(0, Fieldname15 -98.50000) * BF16;
BF38 = MaxList(0, -Fieldname15 +98.50000) * BF16;
BF39 = MaxList(0, Fieldname16 +6.33300) * BF3;
BF40 = MaxList(0, -Fieldname16 -6.33300) * BF3;
BF41 = MaxList(0, Fieldname17 +3.53300) * BF28;
BF42 = MaxList(0, -Fieldname17 -3.53300) * BF28;
BF44 = MaxList(0, -Fieldname18 +52.81000);
BF45 = MaxList(0, Fieldname5 +0.00000) * BF30;
BF47 = MaxList(0, Fieldname17 -58.00000) * BF4;
BF48 = MaxList(0, -Fieldname17 +58.00000) * BF4;
BF49 = MaxList(0, Fieldname19 +78.13000) * BF47;
BF50 = MaxList(0, -Fieldname19 -78.13000) * BF47;
BF51 = MaxList(0, Fieldname20 +82.61800) * BF30;
BF52 = MaxList(0, -Fieldname20 -82.61800) * BF30;
BF53 = MaxList(0, Fieldname19 -95.69001) * BF40;
BF55 = MaxList(0, Fieldname4 -25.42000) * BF44;
BF56 = MaxList(0, -Fieldname4 +25.42000) * BF44;
BF57 = MaxList(0, Fieldname3 +699.52899) * BF44;
BF58 = MaxList(0, -Fieldname3 -699.52899) * BF44;
BF59 = MaxList(0, Fieldname2 -85.59999) * BF56;
BF60 = MaxList(0, -Fieldname2 +85.59999) * BF56;
BF61 = MaxList(0, Fieldname17 -114.86700) * BF56;
BF62 = MaxList(0, -Fieldname17 +114.86700) * BF56;
BF63 = MaxList(0, Fieldname21 +79.71400) * BF28;

aaaFinSoL1min8x1 = -0.35648 -0.00311 * BF3 -0.03182 * BF4 -0.00012 * BF5 +0.00001 * BF6 +0.00001 * BF7 -0.000000056 * BF8 -0.00010 * BF9 +0.00190 * BF10 -0.00040 * BF11 -0.00006 * BF12 +0.00405 * BF14 +0.00040 * BF16 +0.00006 * BF17 -0.0000016 * BF18 +0.0000003 * BF19 +0.0000011 * BF20 -0.00020 * BF21 +0.0000007 * BF22 -0.00031 * BF23 +0.00031 * BF25 +0.00406 * BF26 +0.0000061 * BF27 -0.0000017 * BF28 -0.00017 * BF30 +0.00023 * BF32 -0.000000059 * BF33 -0.000000020 * BF34 +0.00193 * BF37 -0.0000008 * BF38 -0.00007 * BF39 -0.00014 * BF40 +0.000000029 * BF41 +0.000000026 * BF42 -0.01078 * BF44 -0.00003 * BF45 +0.00559 * BF47 +0.00040 * BF48 -0.00014 * BF49 -0.00011 * BF50 +0.0000076 * BF51 +0.00007 * BF52 +0.00001 * BF53 -0.00045 * BF55 +0.00039 * BF56 +0.00001 * BF57 -0.0000088 * BF58 +0.00164 * BF59 -0.0000007 * BF60 -0.00009 * BF61 -0.0000006 * BF62 +0.000000016 * BF63 +0.000000052 * BF64 +0.00012 * BF66 -0.00066 * BF67 +0.00028 * BF68 +0.00005 * BF69 +0.00001 * BF70 +0.0000001 * BF71 +0.000000089 * BF72 -0.000000097 * BF73 -0.000000039 * BF74 -0.00007 * BF75 +0.0000036 * BF77 +0.00002 * BF78 -0.0000075 * BF79 +0.00020 * BF81 -0.03978 * BF83 +0.00001 * BF86 +0.0000093 * BF87 +0.000000031 * BF88 -0.0000011 * BF90 ;

mrbaseball 08-18-2007 12:11 PM

Re: S&P Trading Model - Quite Technical - Meet the Competition
 
[ QUOTE ]
what do you use?

[/ QUOTE ]

Support,ressistance, trendlines, chart patterns, breakouts, divergances etc.

[ QUOTE ]
As trading is different from hour to hour over the 24 hour trading day different models are developed for different time periods.

[/ QUOTE ]

Translated this means it works until it doesn't [img]/images/graemlins/smile.gif[/img] The action over the past two weeks is "abnormal". Particularly the speed of market action recently. Order books getting swept and snapping right back (or not) in the blink of an eye. What works in that environment might not work at all in another. And you never know when the environment is gonna change. Knowing what kind of market you are in is what is most important.

There is no "holy grail". Just solid repeatable ideas that work more often than not if you have the type of market you are in pegged correctly and can stick to a strict disciplined plan of attack.

UrmaBlume 08-18-2007 01:33 PM

Adaptive, artificially intelligent technologies
 
Modern modeling technologies have the ability to adapt to changing conditions if properly trained, developed and backtested.

The classic technical analysis you reference can be extremely effective in the hands of an expert.

A well developed model based strategy can be even more effective even when run by a complete rube.

Plus - sweeping generalizations by someone not expert in advanced genetically optimized artificially intelligent modeling technologies are often incorrect.

mrbaseball 08-18-2007 02:44 PM

Re: Adaptive, artificially intelligent technologies
 
[ QUOTE ]
Plus - sweeping generalizations by someone not expert in advanced genetically optimized artificially intelligent modeling technologies are often incorrect.

[/ QUOTE ]

I wanted to discuss your thread last week but it got locked very quickly for no apparent reason before I could comment.

First I was interested in exactly what that crossover and oscillator were? It looked like some variation of a 3-6 MA crossover system. I was also intersted in what kind of execution you use. Meaning do you use an automatic entry system? With sub one minute bars physical entry on those signals can be trying at best with the speed of the market moves meaning if it isn't the computer itself putting in the order you miss many of them. Also that section of chart seemed tailormade for such a crossover system yet those experienced in similar methods realize there are plenty of periods where such an approach is a chop shop. How do you avoid the mincemeat when the market is whipsawing in a narrower range as it often does?

UrmaBlume 08-18-2007 03:15 PM

Noise discriminiation
 
Your are correct about order entry, with sometimes as many as 12 bars per minute, manual execution/order entry is impossible.

The chart below is a bit slow compared to what I/my software normally trades and yet still it only shows 25 minutes and includes 14 or more plainly indentifiable trades/28 transactions.

The zero phase adaptive moving averages on price are there only for reference.

The histogram based oscillator on the bottom of the chart is based on my own proprietary micro time frame volume analysis algorithms.

As you may have already read I put little stock in indicators based on price. It is my belief that it is buying and selling volumes that predict price and not price itself. Also, micro analysis of certain volumes can predict noise as well as trend in almost every time frame.

While the chart below shows remarkable organization even at this very low time frame this is not the output from any modeling technology but merely a couple of the inputs and demonstrated here as a reference.

Of course MA systems suffer greatly in noisy periods so one of the first responsibilities of any effective model is to recognize periods of noise and either avoid them or take advantage of them depending on the model's utilization.


http://www.tradepointtechnologies.com/1kBar.jpg

UrmaBlume 08-18-2007 03:29 PM

2 Basic Principles - Macro
 
EVERYTHING I do in the market is based on 2 basic priciples:

1 - Information = Equity. Everytime a trade is entered a certain equity is assumed. If the information that is the basis for the trade is good then the equity will increase.

2. Buying and Selling Pressure. It is buying and selling pressure that drives price. If you can precisely measure the net buying and selling pressure in any time frame then you can predict the price.

DcifrThs 08-18-2007 03:44 PM

Re: 2 Basic Principles - Macro
 
[ QUOTE ]
EVERYTHING I do in the market is based on 2 basic priciples:

1 - Information = Equity. Everytime a trade is entered a certain equity is assumed. If the information that is the basis for the trade is good then the equity will increase.

2. Buying and Selling Pressure. It is buying and selling pressure that drives price. If you can precisely measure the net buying and selling pressure in any time frame then you can predict the price.

[/ QUOTE ]

1) how long have you done this? i.e. when was the system started?

2) can you provide a return stream for your system? i'd like to see how it does.

thanks,
Barron

UrmaBlume 08-18-2007 03:58 PM

Posts Speak
 
1. I started doing volume analysis on the CBOT Bond Futures during the late 70's.

2. Have you ever seen ANYONE post commercial trading results for the public to see? I also will not.

I believe my posts present information not generally available to the public. My purpose here is to discuss/share and in some cases mentor.

I might even give away an egg or two but the goose is mine and it is not for sale or lease.

This isn't about the TED spread.

DcifrThs 08-18-2007 04:29 PM

Re: Posts Speak
 
[ QUOTE ]
1. I started doing volume analysis on the CBOT Bond Futures during the late 70's.

2. Have you ever seen ANYONE post commercial trading results for the public to see? I also will not.

I believe my posts present information not generally available to the public. My purpose here is to discuss/share and in some cases mentor.

I might even give away an egg or two but the goose is mine and it is not for sale or lease.

This isn't about the TED spread.

[/ QUOTE ]

how would anybody be able to recursively construct anything based solely on your return stream.

i basically wanted to see the information ratio you generated as well as the overall return stream and analyze any and all of the big jumps and basically look into it.

it wouldn't be giving the goose away at all. look at teh CSFB tremont index. there are some of the most sccessful hedge fund return streams.

i'm asking because i'm curious. if you want i'll sign an NDA and you can email it to me b/c i like looking into this stuff.

i don't see the harm in posting a return stream since a) you can't determine total returns to capital based on it, and b) you can't reconstruct your trading system based onit.

i also don't get the comment about the TED spread? did i miss a post on it or something?

Barron

pig4bill 08-18-2007 04:30 PM

Re: Posts Speak
 
You need to shrink your images before you post them. When I see these threads I don't even read them because the scrolling is a PITA.


All times are GMT -4. The time now is 08:43 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.