An Interactive Backtesting Development Example

Quote from Argent:

And I thought I was cleverly sucking him in to admitting that! Pretend that he doesn't understand the difference and desplain it to me. As soon as I saw one of his links that said "161 patterns found" he lost me. I would still like to understand how it works, though. It is no fun at all being old and hidebound and neophobic. Homophobic is bad enough. And what be pirates, aargh!, that he be afeard?

Hah, I'll keep quiet then. Let you finish the job. Bill's probably got me on ignore anyway.

In fact, I'll often write a post, think about what I've written and then click "Delete". This actually happens most of the time as I just don't feel a need to put into words my waffling (always on the fence) thinking process. It tends to drive people crazy.

Pirates :) 4th post down:

http://www.elitetrader.com/vb/showthread.php?s=&threadid=225190&perpage=10&pagenumber=2
 
Quote from Mike805:

Hah, I'll keep quiet then. Let you finish the job. Bill's probably got me on ignore anyway.

In fact, I'll often write a post, think about what I've written and then click "Delete". This actually happens most of the time as I just don't feel a need to put into words my waffling (always on the fence) thinking process. It tends to drive people crazy.

Pirates :) 4th post down:

http://www.elitetrader.com/vb/showthread.php?s=&threadid=225190&perpage=10&pagenumber=2

Hereabouts when we go a waffling we want warm maple syrup on it. I believe the pirates chart. We haven't hanged one in my neighborhood for decades. Re finishing the job, I think Bill tires of disputing with an old fool. We're so simple we're no fun to demolish.
 
Rather than continue discussing backtesting, I think I'll just hang it up with a thread template for everyone on ET to follow, as if they needed prompting:

Poster A (the originator): "Here is my serious idea about trading"

Poster B: "Poster A, you're an idiot!"

Poster C: "No, Poster B, you're the idiot!"

Poster D: "You're both idiots!"

Poster A: "Aaaaarrrrrrgggggghhhhh!!!!!!
 
Quote from Mike805:

I'm always interested in backtesting. I'm sure there are many here who are interested as well.

Give it a go, continue.

Thanks for the encouragement. But I am not spoonfeeding. I asked the question of those who want to learn: "What variables do we need?" so we can create the first block of code. The next time I start a thread I'll lead with a squirrel shot. Then rag on jews and jew down ragheads. Call democrats queers and rebublicans pedophiles. Praise Jack Hershey and curse the moderators. Pimp a penny stock and whore out my website. All in one thread. Guaranteed parpissipation.
 
IntradayBill and I are total direct opposites in how we generate trading code. I have written commercial code since 1973 in numerous programming languages on many mainframe, minicomputer and PC operating systems. Today in my retirement I write the majority of my trading code in TradeStation Easy Language and execute on TS and MultiCharts/IB.

Either IntradayBill or I can build working trading systems. I greatly respect IntradayBill and his contributions to ET using his methods. There is no right or wrong way to use tools to build trading applications as long as the trading solutions allow for the use of good trading practices and we meet our objectives.

When I taught Computer Science in the 1970s the same debate raged. Program in COBOL or use a program generator called RPG II (see http://en.wikipedia.org/wiki/IBM_RPG_II). Those for RPG II said productivity would kill COBOL. COBOL proponents stated they could do processing 150% faster and crush RPG II by eliminating high CPU cost. COBOL won the battle but for the wrong reason. It won because the billing rates for COBOL programmers were double RPG II programmers. However, commercial code generators are just as popular today as in the 1970’s. In computers today there are more than 100,000 commercial code generator software packages available and just as many commercial programming tools for those who write code. For example Hogan systems can generate code to run a whole commercial bank (see http://www.csc.com/banking/offerings/11090/48573-hogan_systems).

I see no reason in today’s retail product market to not use code generators unless you have a passion for writing code like I do. People who write code expect that they will gain an ‘edge’ over generated trading applications. The trader who generates a trade with an entry, stop and target may generate an acceptable application that produces profits in a short of time and trades profitably. But code writers expect to do considerably better by using specific trading language extensions.

The advantage that a code writer has over a code generator is that they can build dynamic trading applications that are variable in nature. The down side is these applications take much longer to build, test and implement. For example the simple trading system noted above can have more bells and whistles added to increase profits but take ten times as long to code and test. Is it worth doing? Well maybe if the entry, stop and the target can be better tuned to the price landscape, changing volume and volatility cycles. Rather than fixed entry, targets and stops I code ATR’s for entry, targets and stops.

Yes, these things can be coded by generators but hard code writers will beg to differ about how profitable a generator can use these areas. For example try to generate code effectively with ticks, bids, asks, arrays, trade statistics, etc… That is where back testing settles this debate for me.

So it boils down to a matter of passion and taste. Some traders want cold straight results in a static trading environment. Where I demand warm lose results in a dynamic trading environment. Is one method better than the other? Who knows? As long as we both keep meeting our goals and objectives who cares?

P.S. I am going back bass fishing in my ranger boat till labor day. I got to do something with these profits before the goverment sucks them out of me. Best of trades to you.

Quote from intradaybill:

Anywhere from 60+ K to 3K. The system I have generates full code for TS and Wealth Lab and logic-only type of a thing for Amibroker and other platforms but I have developed some templates to fit it in and just do copy and paste.

There are other systems I have not tested. Safir-X and Trading System Lab are two of them for example. I tested some others and they just took too long or the results were fitted or random systems.

I mean backtesting yourself is like developing a program using CPU language rather than using a high level language.
 
Quote from Rabbitone:

IntradayBill and I are total direct opposites in how we generate trading code. I have written commercial code since 1973 in numerous programming languages on many mainframe, minicomputer and PC operating systems. Today in my retirement I write the majority of my trading code in TradeStation Easy Language and execute on TS and MultiCharts/IB.

Either IntradayBill or I can build working trading systems. I greatly respect IntradayBill and his contributions to ET using his methods. There is no right or wrong way to use tools to build trading applications as long as the trading solutions allow for the use of good trading practices and we meet our objectives.

When I taught Computer Science in the 1970s the same debate raged. Program in COBOL or use a program generator called RPG II (see http://en.wikipedia.org/wiki/IBM_RPG_II). Those for RPG II said productivity would kill COBOL. COBOL proponents stated they could do processing 150% faster and crush RPG II by eliminating high CPU cost. COBOL won the battle but for the wrong reason. It won because the billing rates for COBOL programmers were double RPG II programmers. However, commercial code generators are just as popular today as in the 1970�s. In computers today there are more than 100,000 commercial code generator software packages available and just as many commercial programming tools for those who write code. For example Hogan systems can generate code to run a whole commercial bank (see http://www.csc.com/banking/offerings/11090/48573-hogan_systems).

I see no reason in today�s retail product market to not use code generators unless you have a passion for writing code like I do. People who write code expect that they will gain an �edge� over generated trading applications. The trader who generates a trade with an entry, stop and target may generate an acceptable application that produces profits in a short of time and trades profitably. But code writers expect to do considerably better by using specific trading language extensions.

The advantage that a code writer has over a code generator is that they can build dynamic trading applications that are variable in nature. The down side is these applications take much longer to build, test and implement. For example the simple trading system noted above can have more bells and whistles added to increase profits but take ten times as long to code and test. Is it worth doing? Well maybe if the entry, stop and the target can be better tuned to the price landscape, changing volume and volatility cycles. Rather than fixed entry, targets and stops I code ATR�s for entry, targets and stops.

Yes, these things can be coded by generators but hard code writers will beg to differ about how profitable a generator can use these areas. For example try to generate code effectively with ticks, bids, asks, arrays, trade statistics, etc� That is where back testing settles this debate for me.

So it boils down to a matter of passion and taste. Some traders want cold straight results in a static trading environment. Where I demand warm lose results in a dynamic trading environment. Is one method better than the other? Who knows? As long as we both keep meeting our goals and objectives who cares?

P.S. I am going back bass fishing in my ranger boat till labor day. I got to do something with these profits before the goverment sucks them out of me. Best of trades to you.

This is truly a fantastic post; thank you for sharing. Code generation still seems unusual to me (would need to see it in action) -- I get the feeling I wouldn't feel comfortable with the simple rigidity of what you're testing, but it seems agile and robust in its scope. You clear up some aspects of it to me.

Though it's the endless wit that keeps me coming back to Argent's posts, there's always some interesting insight to be gleaned from multiple sources at the same time.
 
Quote from Argent:

For any who are interested, I will go through the process of developing a backtest using my existing eSignal code. I will not spoonfeed. If you want to participate, it must be interactively. To begin, please look at the following structure and ask any questions about it you like. Following that we will build up code for an example of my choosing that I know functions correctly. I believe that eSignal's language is sufficiently simple that anyone here can follow it.
...
Start again: who are you, and why should anybody care to be talked condescendingly by you?
 
Quote from baro-san:

Start again: who are you, and why should anybody care to be talked condescendingly by you?

Absolutely nobody. And rather than condescension I prefer to think of it as arrogance.
 
Quote from intradaybill:

I have demonstarted before beyond doubt that you are an idiot. I am using data mining to also test conceptual ideas. You cannot understand that because that exceeds your mental capacity. When I use data mining to test for ratio of long versus short patterns, this is testing conceptual ideas. When I use data mining to find out what range of stop-loss is appropriate this is also testing conceptual ideas. These are just two examples of many.

Also, your attacks are unprovoked and constant. If you have nothing better to do with your life I suggest you find something. As far as trading and system development you are a total loser and a waste of time.

Alright Bill,

Time to put up or shut up. This is the umpteenth time you've called me a loser. So, I'm calling you out. Show us your track record, or any documentation that gives you the right to be some high'n'mighty jerk.

Here's one of my 100% systemic accounts. Anyone who uses IB will know this is for real. I've edited out account numbers.

Put up or STFU Bill. Time to stop with your childish bullshit.

Mike
 

Attachments

Back
Top