Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

Predictor

The Clone: Exploring Cyborg Synthesis

Recommended Posts

clone.png

 

The idea of self-improvement has always fascinated me. In fact, I’ve been really fascinated by two ideas. The first idea is the idea of synthesis. The idea of combining my strong discretionary market read with technology to enhance my performance. This idea of synthesis is the idea that we can use technology to achieve self-improvement. The second idea I’ve been enamored with is the idea that if instead of trading in a single way that if I could trade in 10 ways that I might learn 10 times as much and 10 times as fast.

 

We shift the paradigm from being forced to make decisions to a new paradigm in which we can try everything that we desire. Instead of being forced to trade in one style or another, we can trade in both. We simply try everything that we think could make sense and then later we evaluate which of those methods actually worked the best. For example, instead of debating on whether to use a smaller stop or a larger stop then we simply trade additional accounts with the two stop sizes. And, instead of wondering if we should take a profit quickly or let it ride then we simply do both. Of course, I see this as a learning exercise probably best conducted in simulated accounts but certainly for the stronger convictions they could be taken in live accounts. And, I do think this exercise has a great value as a learning tool. Yet, taking trades in more than a couple of accounts quickly becomes distracting and difficult.

 

Meet the Clone

 

I had built trading systems, and I had optimized them. The real breakthrough came when I realized that the optimization of a trading system and my clone concept were very similar and that optimizing my discretionary trades would be the ultimate clone. The idea was that if I could read my discretionary trades into a trading platform like Tradestation then I could bring to bear a great deal of analysis that had been reserved for system developers. This would represent a concrete application of my synthesis paradigm.

 

Requirements and Limitations

 

The first requirement is that you must have timestamps for your trades. I had planned to import my recent live trades into the analysis. However, when I checked my statements for the timestamps I couldn’t find them, and so instead I will analyze the signals I provided at C2 under my discretionary futures system.

 

There are a few limitations, as well. The first is that Tradestation only has minute granularity and this introduces a certain amount of noise into the results and will likely result in slightly worse hypotheticals. The second limitation is that, obviously, it is only possible to analyze a single symbol at a time. The script can use the chart symbol as a proxy for multiple symbols. The trades should be in sequence and if multiple symbols were held overlapping then some trades will be skipped. Even with the limitations, a professional trading platform like Tradestation brings an unparalleled amount of analytical power for the discretionary trader.

 

Basic Analysis and Example

 

The second best month that I had offering signals in 2011 was in October. The approximate equity curve for that month is shown below. Note that this equity curve isn’t completely accurate because I’m using the ES for a proxy for all instruments traded, and I traded the ES, CRUDE, and the NQ. Likewise, the large loss came from a crude oil trade. The current script can’t handle multiple entries open in the same direction. Even with these limitations, I compared the hypothetical equity curve to the generated curve and they were about the same:

 

1.png

 

The trade statistics can also provide useful information which can be used for future performance reviews and enhancement:

 

2.png

 

One of the first things I note is that my average trade played out within about 52 minutes whereas I held onto my losers for up to about 4 hours. The analysis suggests that it might make sense for me to cut my losers more quickly. Fortunately, we don’t have to guess, as I can code this as a rule into the analysis if desired.

 

Other Types of Questions

 

The fact that multiple contracts were traded in the above example makes it more difficult to understand the size of the trades in point terms. This can be easily resolved by analyzing the profits on a per contract basis. It is possible to set the max contracts in the strategy properties or by overriding the contracts variable in the code. After limiting the contracts to only 1, we can see more easily see that my edge was worth about 1 point, average win about 3 points, and average loss about 5 points:

 

3.png

 

Beyond The Basics

 

The statistics above represent the approximate times that I opened and closed my trades. However, I can just take the entries and add new exit rules for stop and targets which I can then optimize. This can result in some trades being skipped but should prove useful nonetheless.

 

Under the format options, it is possible to declare the “LossLimitDollar” and “ProfitTargetDollar” inputs as optimizations which allow Tradestation to do the work for us. A word of caution, the Excel spreadsheet must be read each optimization, and this can take a very long time. It is advised to start with broad general optimizations requiring limited runs.

 

I let the optimizer work away for several minutes. I didn’t do a comprehensive optimization. Yet, the optimizer has already produced meaningful improvements. I notice the average bars in the losing trades dropped considerably:

 

4.png

 

Of course, this is only a small sample of what is possible. The creative trader could analyze based on time of day filters, time based exits, and even add specialized entry rules.

 

Technical

 

Unfortunately, I can’t provide support for this script. This was programmed rapidly and was only intended for my use.. You must have Excel installed and the Excel file path and the sheet name must match exactly with what is in the file. The script will throw an exception if it doesn’t and the script must be turned back on. I’ve included a proper sample Excel file as an example. I've commented out the stop loss and take profit, sections and they must be uncommented to be used. I’ve left in some code that is not used but could be useful for expanding and adding additional trading rules.

 

The code and sample Excel:

 

(Copy and Page Into A New Strategy)

http://themarketpredictor.com/external/tradestation_clone.txt'>http://themarketpredictor.com/external/tradestation_clone.txt

http://themarketpredictor.com/external/Clone_Sample_Data.xls

 

Inputs:

WorkbookName: The file path and name. It must be exactly correct.

SheetName: The name of the Excel sheet where the trades are located. This must be exactly correct.

FirstRow: The first row to start reading trades from, typically row 2.

LastRow: The last row to read to. This must exist.

 

Other Platforms

 

The minute resolution is one major limitation in the Tradestation platform. It would be very useful to have a similar script that could be run under Multicharts and Ninjatrader. If you program such a script then please send it to me, and I will update the article with your contributions.

 

---

http://themarketpredictor.com

Share this post


Link to post
Share on other sites

It's fascinating to see the possibilities of importing discretionary results into TS.

 

We simply try everything that we think could make sense and then later we evaluate which of those methods actually worked the best.

 

A formal extension of what you describe here would be the use of genetic algorithms. Not only would this allow you to eliminate less successful candidates, it would also breed new solutions without further input from yourself - this can always throw up useful and profitable suprises that a trader might never have thought of themselves.

 

Hope that helps!

 

BlueHorseshoe

Share this post


Link to post
Share on other sites

Unfortunately Tradestation only goes so far....you cannot for example look at the impact of some types of scale out protocols and in markets (like S&P Futures for example) this is a significant deficit....There are also significant problems for those who need to do portfolio level analysis as well....Tradestation is fine if you already have the product and need to learn the basics....just realize that there is potential to end up with a system that looks good initially but then, doesn't perform as you expect or whose performance degrades quickly once you start live trade. (Yes this can happen with any backtest product, but I would argue that it is more likely with a product like Tradestation)....

 

Many if not most professionals write their own software to accomplish this, although there are a number of alternatives that traders can (and should) look at....

 

for those seriously interested in this subject, the best way to start is to make a comprehensive list of your goals and then translate that into a list of required "features" that you can use when evaluating backtesting software.

 

Finally, a big part of the success of the user depends on YOUR ability to interpret backtest results. If you don't have a solid foundation in basic stats.....this would be the time to go get it...

Edited by steve46

Share this post


Link to post
Share on other sites

Tradestation is awesome.

 

I've only experienced one instance (over the course of 18 yrs of using TS) where I failed to complete a project that interested me. The stuff you describe as being beyond the capabilites of TS are relatively simple studies that can be achieved in TS. ... (by professionals).

 

Unfortunately Tradestation only goes so far....you cannot for example look at the impact of some types of scale out protocols and in markets (like S&P Futures for example) this is a significant deficit....There are also significant problems for those who need to do portfolio level analysis as well....Tradestation is fine if you already have the product and need to learn the basics....just realize that there is potential to end up with a system that looks good initially but then, doesn't perform as you expect or whose performance degrades quickly once you start live trade. (Yes this can happen with any backtest product, but I would argue that it is more likely with a product like Tradestation)....

 

Many if not most professionals write their own software to accomplish this, although there are a number of alternatives that traders can (and should) look at....

 

for those seriously interested in this subject, the best way to start is to make a comprehensive list of your goals and then translate that into a list of required "features" that you can use when evaluating backtesting software.

 

Finally, a big part of the success of the user depends on YOUR ability to interpret backtest results. If you don't have a solid foundation in basic stats.....this would be the time to go get it...

Share this post


Link to post
Share on other sites

Actually I stand corrected Onesmith....as of the middle of February 2012, Tradestation upgraded its software to provide portfolio level backtesting...

 

Now whether it works well, or does not, I cannot say...haven't tested it.....you see for a long time IT COULD NOT HANDLE PORTFOLIO LEVEL BACKTESTING...and over a period of time those of us who needed that had to go elsewhere or write our own...

 

I was also a customer and left them, because I managed a portfolio of assets and couldn't wait for them to provide that feature....apparently during the 18 year period you mention, you did not need it....during that time you would have had to have done it manually, I know because I inquired many times....

 

congrats Tradestation....it only took 18 years!......lol

 

Thanks Onesmith for the update...

Edited by steve46

Share this post


Link to post
Share on other sites

Pros don't need built-in icons.

 

Attempting to discredit the OP based on his choice of platform fails. This thread is outside the box. Imaginations already racing toward Genetic Algorithms.

 

Lead or follow. The limits you aspire to resolving don't hinder some of us.

Share this post


Link to post
Share on other sites

or in your case "catch up"......anything you can read about here is likely to be yesterday's news....Genetic algos were written about in the "Encyclopedia of Trading Strategies" by Jeffrey Katz and Donna McCormick published in 2000.....The technique dates back well before that so..........Been there, done that, got the T-shirt......

 

by the way the book is a good resource for those interested in developing strategies.....well written...and there's nothing wrong with using GA....I've seen skilled operators use that approach with good success...

 

Here is a general resource for people interested in that approach...

 

http://en.wikipedia.org/wiki/Genetic_algorithm

 

about 2/3 of the way down the page look for "GA with adaptive parameters"...

 

and again congrats to Tradestation, it only took nearly two decades for them to provide a product that lives up to the hype....I sure it fits you perfectly....

 

and now I think we have strayed away from the original posters intent, so I am out of here...

 

Good night.

 

Edit

 

Just a quick thought, I remember using an optimizer add-on for Excel by Palisade....as I recall they produce a professional level product...and it is (was) priced pretty reasonable.

Edited by steve46

Share this post


Link to post
Share on other sites
Unfortunately Tradestation only goes so far....you cannot for example look at the impact of some types of scale out protocols and in markets (like S&P Futures for example) this is a significant deficit....

 

Can you give an example? Most things are possible. Onesmith kindly provided examples of code in 'strategies with multiple exits' thread.

 

The lack of portfolio testing is/was a drawback - am I wrong in thinking that that even now this remains a pay-to-use add on?

 

Nevertheless, TS is a fantastic piece of software.

 

Finally, a big part of the success of the user depends on YOUR ability to interpret backtest results. If you don't have a solid foundation in basic stats.....this would be the time to go get it...

 

Couldn't agree more!

 

BlueHorseshoe

Share this post


Link to post
Share on other sites
The first requirement is that you must have timestamps for your trades.

 

v1 is an indicator that knows c crossed above avg. Visualize simulating entry price and storing it in this indicator. Nextbarmarket thisbarclose stop limit or any variation imaginable. Declare inputs for commission and slip. Calculate net on exit and track the total of all trades.

 

v2 declares average length as an array. It spins length and records netprofit for each length. It's purpose is to illustrate a value can be optimized outside the constraints of the built-in backtesting engine.

 

v3 of this indicator is unaffected by limits that apply to strategies, such as it's only possible to backtest the symbol inserted as data1. Portfolio Analysis has always existed within TS.

Share this post


Link to post
Share on other sites

Wow! Prospector, err, I mean Predictor, that is a great equity curve. It's too bad you can only do that by looking backwards. If one could do it presently, one wouldn't have to hustle novice traders to make some scratch.

 

Presently, it seems your still struggle with stop placement and it will be tough to duplicate that curve if you are second guessing your actions.

Share this post


Link to post
Share on other sites
v1 is an indicator that knows c crossed above avg. Visualize simulating entry price and storing it in this indicator. Nextbarmarket thisbarclose stop limit or any variation imaginable. Declare inputs for commission and slip. Calculate net on exit and track the total of all trades.

 

v2 declares average length as an array. It spins length and records netprofit for each length. It's purpose is to illustrate a value can be optimized outside the constraints of the built-in backtesting engine.

 

v3 of this indicator is unaffected by limits that apply to strategies, such as it's only possible to backtest the symbol inserted as data1. Portfolio Analysis has always existed within TS.

 

"ALWAYS"?

 

Here is the link to the Feb (this year) release of Tradestations "NEW" portfolio feature....

 

TradeStation Releases Powerful New Portfolio-Level Back-Testing Tool | Press and News | TradeStation

 

I'm sure there is some way for you to dance around this too......

 

So once again for those capable of rational thought....Tradestation used to be the best, and for a while, the only real alternative for pros....then they got complacent, and other vendors came into the market and they were more responive to users requests....like myself, some customers got tired of waiting for TS to respond to their requests and decided to write their own....

 

by the way, there is a thread on TL where Urma Blume talks about issues that many of us struggled with before deciding to move to other platforms...here is the link...post #11

 

http://www.traderslaboratory.com/forums/e-mini-futures-trading-laboratory/9350-too-good-true-2.html

Edited by steve46

Share this post


Link to post
Share on other sites

MightyMouse, I'm not sure what you mean "by looking backwards". That equity curve was generated by REAL TIME signals I provided. I imported the REAL TIME signals into Tradestation to analyze them. As for the present, my net real money percent returns are already better then my best year that I provided signals, and I'm only slightly off my all time highs.

 

I see you made some assumptions about how I was doing based on just a couple posts in the ES thread where I had good trades but were stopped out. I was waiting for someone to make those wrong assumptions. I think it is human nature. And the ironic reality is that countless traders have been believed to be winning but either weren't even placing real trades or turned out to be losing.

 

I want to clarify something else too. I have never claimed to teach someone "how to trade". I do provide instruction on specific skills but I don't even believe it is possible to "teach how to trade" -- just like its not possible to learn "how to program". Trading like programming is very broad with many levels of skills and difficulty. Of course, one can learn to make a given program and after they make many types of programs they may feel they learned to program but surely there will be some programs they can't make.

 

I view trading as a process and not a result. A process that I enjoy. Sure, I'm struggling with stop placement. But, that's normal for me.. that's part of the process.

Edited by Predictor

Share this post


Link to post
Share on other sites

Mighty Mouse

 

I think your assumptions are reasonable....given what we see...I am enjoying all the dancing around each point thats made....very entertaining...I think its very convenient to suggest that trading (among other things) cannot be taught....makes it easy to avoid taking responsibility if your "customers" spend money with you and then cannot make much use of it....it then becomes "someone else's problem".....I think this person should consider changing his handle from "Predictor" to "Disclaimer".....

Share this post


Link to post
Share on other sites
"ALWAYS"?

 

some customers got tired of waiting for TS to respond to their requests and decided to write their own....

 

Yes Steve - I think the point that is been made (as with my point about realising multiple stops within an EL strategy) is that where you chose to build your own portfolio analysis in Excel or wherever, it was always possible to build your own portfolio analysis in EL if you had the necessary programming expertise . . .

 

Just because you can't do something, don't assume that it's impossible!

 

BlueHorseshoe

Share this post


Link to post
Share on other sites

I see you made some assumptions about how I was doing based on just a couple posts in the ES thread where I had good trades but were stopped out. I was waiting for someone to make those wrong assumptions.

 

I commented based on your comments and not on how you were doing with your trades on the es thread. I have no idea how those trades worked out; all I know is that you commented about moving your stop. Second guessing your actions doesn't seem to me to be part of a "strong discretionary market read". But I suppose it's all a part of the enigmatic image you are developing.

Share this post


Link to post
Share on other sites
Yes Steve - I think the point that is been made (as with my point about realising multiple stops within an EL strategy) is that where you chose to build your own portfolio analysis in Excel or wherever, it was always possible to build your own portfolio analysis in EL if you had the necessary programming expertise . . .

 

Just because you can't do something, don't assume that it's impossible!

 

BlueHorseshoe

 

 

One gets the impression from both Onesmith and yourself......that your lips move as you type.....in my office the decsion whether to use Tradestation or to code our own was made by group vote (I voted for change)....the development phase was a group effort.....and the result was that we obtained a product that was more useful than Tradestation offered at that time...

 

Amazing that we managed to get that done without benefit of your advice.....?

Edited by steve46

Share this post


Link to post
Share on other sites
.....and the result was that we obtained a product that was more useful than Tradestation offered at that time...

 

Well done you! That's really great . . .

 

But I won't divert you with further congratulations - I'll let you get back to your main business in this thread of trolling Predictor and belligerently knashing your teeth at anyone else who might happen to disagree with you ;)

 

BlueHorseshoe

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Topics

  • Posts

    • ADMA Adma Biologics stock, watch for a range breakout, target 26 area at https://stockconsultant.com/?ADMA
    • URI United Rentals stock, nice rally off 829 support area, watch for top of range breakout at https://stockconsultant.com/?URI
    • Date: 27th November 2024. S&P500 at its 52nd new peak for 2024; USD Firmer, Kiwi & Yen Up. Asia & European Sessions: Wall Street rallied into the close with the S&P500 and Dow registering more record highs with the S&P500 climbing 0.57% to 6045, its 52nd new peak for 2024. The Dow rose 0.28% to 44,860.3 for its 46th record of the year. The NASDAQ advanced 0.63%. Trump named Jamieson Greer as the US Trade Representative and Kevin Hassett to direct the National Economic Council. Greer was intimately involved in Trump’s first-term trade policy decisions. President Biden announced Israel and Hezbollah have reached a cease fire. Over the next 60 days the Lebanese army and state security will take control of their own territory and Israel will gradually withdraw its forces. FOMC minutes: Minutes from the Fed’s latest policy meeting revealed officials leaning toward a cautious approach to future rate cuts. All agreed to cut the rate by -25 bps and nearly all thought risks between achieving employment and inflation goals were “roughly in balance.” Upside risks to the inflation outlook were little changed, and while inflation had eased, it remained elevated. The implied December rate continues to hover around a 50-50 bet as we await the PCE price data Wednesday and the crucial jobs report on December 6. The January 2025 rate is priced for a total of 20 bps in cuts, with -75 bps by January 2026. RBNZ cut its cash rate by 50 bps, yet the Kiwi gained as traders analyzed the central bank’s rate outlook and the governor’s remarks. Chinese government approved a 500 billion yuan ($69 billion) bond quota, enabling two state-owned asset managers to issue bonds for funding projects aimed at spurring economic growth. Today: US inflation and economic growth may provide clues to the Federal Reserve’s next policy move. Financial Markets Performance: The USDIndex has dropped to currently 106.459. The Yen climbed with USDJPY pulling back to 151.82, while NZDUSD jumped to 0.5900 despite the RBNZ’s 50 bps rate cut. Oil prices stabilized at $68.84, with optimism over delayed OPEC+ output increases balancing the reduced geopolitical risk stemming from the ceasefire. Gold rebounds to 2653.54, with next Resistance at 2660-2664. Always trade with strict risk management. Your capital is the single most important aspect of your trading business. Please note that times displayed based on local time zone and are from time of writing this report. Click HERE to access the full HFM Economic calendar. Want to learn to trade and analyse the markets? Join our webinars and get analysis and trading ideas combined with better understanding of how markets work. Click HERE to register for FREE! Click HERE to READ more Market news. Andria Pichidi HFMarkets Disclaimer: This material is provided as a general marketing communication for information purposes only and does not constitute an independent investment research. Nothing in this communication contains, or should be considered as containing, an investment advice or an investment recommendation or a solicitation for the purpose of buying or selling of any financial instrument. All information provided is gathered from reputable sources and any information containing an indication of past performance is not a guarantee or reliable indicator of future performance. Users acknowledge that any investment in FX and CFDs products is characterized by a certain degree of uncertainty and that any investment of this nature involves a high level of risk for which the users are solely responsible and liable. We assume no liability for any loss arising from any investment made based on the information provided in this communication. This communication must not be reproduced or further distributed without our prior written permission.
    • RBLX Roblox stock, pull back to 49.2 gap support area at https://stockconsultant.com/?RBLX
    • UHS Universal Health Services stock, nice rally off the 197 support area, from Stocks to Watch at https://stockconsultant.com/?UHS
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.