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.
-
Content Count
400 -
Joined
-
Last visited
Content Type
Profiles
Forums
Calendar
Articles
Everything posted by Do Or Die
-
See here for a subliminal intraday trading tool: http://www.amibroker.org/userkb/2011/07/22/a-subliminal-intraday-trading-tool/ Wikipedia link: http://en.wikipedia.org/wiki/Subliminal_stimuli There are also a lot of CDs being sold on the same concept. Anyone tried it?
-
Hi, Optimization refers to the combinatorial search over a range of system input values on price data defined over a fixed number of bars for the cases that produce the best system net profits or some other selected performance variable. It is unavoidable because markets lack stationarity in any form at all and so adaptability is essential for a trading system. By default it is equivalent to curve fitting because you are searching for ‘best fitting’ input parameters. In practice, you can use optimization results to model a more ‘adaptive’ system. Running an optimization can be the easiest way to look for parameters which the market favors in different phases or time intervals. A simple method is to map the changes in optimum input range with a market characteristic such as volatility or trendiness. This in turns helps to build a layer of adaptability or regime analysis which is essential for any trading system. Important Points To Avoid Curve-fitting Simulations should be close to actual execution: Perhaps the most important aspect of backtesting/optimization is to avoid simulations which cannot be executed in practice similarly as the simulation. For example, in intraday systems, optimizing a strategy which takes profits which are less than 5 times of bid-ask spread will likely be meaningless. Similarly, for EOD systems using the optimized performance on 2008 to trade/test during 2010 can be unprofitable because there was a dramatic shift in trading regimes over these periods. Premise based system design: A large number of input parameters or technical indicators lead way to curve-fitting. Using a premise-focused approach helps you keep the parameters minimum and the strategy simple. While modeling a strategy it is easy to get lost on the combination of entry/exit conditions; however, using this approach will help you to focus on the characterstic of market behavior that you intend to exploit in the first place, and which is essential to the ‘edge’ of the system. It is extremely important to code simple “elegant” strategies in order to avoid added complexity which will result in curve fitted solutions. Sufficient sample data for simulation: This is a common adage in statistics; there is hardly anything to elaborate. If the period for which the system is tested is small enough, you may need to test it across a large number of symbols. The (expected) number of trades on which the optimization is performed should also be large enough. I prefer minimum 200 trades (ideally more than 1000) which may be tested on more than 100K bars of data. Small sample data increases the chances of curve fitting to a great extent. Keep your system symmetric: One of the first ideas new traders have when they start system development is to have a separate criteria for Entry/Exit and Short/Long trades (for example using an indicator parameter 20 for long entries but 15 for shorts). This is because separate criteria increase the number of conditions (and degrees of freedom). If a system from profitability to losses depending only on complicated combination of rules it is less likely to be robust. Even though on daily time frame bull markets tend to have totally different characteristics than bear markets, it is better to have a long(short) only strategy than depending on complicated combinations. Also testing the same strategy over different time frames gives information about its stability. Out-of-sample testing periods: A very common practice in system development is go for rolling backtests or walk forward optimization. Certainly the out-sample test doesn’t have to be profitable (as all strategies have profit and draw down periods) but it must at least hold correlation to the draw down depths and profitable periods seen in the past. As a general rule, if an out-sample test shows a MDD (max draw down) more than twice the previous MDD then the strategy may be curve fitted. ‘Sharp’ clusters in profits distribution: It is good to have a look at distribution of profits w.r.t. to the change in input parameters. For example, if input 24 gives profitable results but 23 and 25 are unprofitable then it means that the system is ‘instable’ between the input range 23-25. Such system will be unprofitable in actual trading because it depends on particular optimum criterion. Likewise if the system is profitable with input 40 and its profitability gradually decreases as the range is shifted >50 or <30 than it is much more stable with the parameter 40. From a trader's perspective, finding single sharp peak is useless for trading because that result would be instable (too fragile) and not replicable in real trading.
-
Open Source Trading Platforms (Master List)
Do Or Die replied to Do Or Die's topic in Tools of the Trade
Yes traderlink is the best bet, though it will need some customization. But even with that Traderlink+Sterling seems to be a more efficient solution than Ninjatrader+custom interface+Sterling. Though I will actually implement this after few months, currently have other priority. -
The More Trustworthy Average: EMA, MA, or VWAP?
Do Or Die replied to Enigmatics's topic in Technical Analysis
http://ssrn.com/ PS: Statisticians tend to be just as biased as technical analysts, when it comes to proving a stationary property of the markets. -
The More Trustworthy Average: EMA, MA, or VWAP?
Do Or Die replied to Enigmatics's topic in Technical Analysis
I just ran a ema trading system as mentioned here: http://www.traderslaboratory.com/forums/tech-analysis/10430-trading-regime-analysis-using-rsi.html The results are encouraging! (click to enlarge) -
Welcome to TL! ..........
-
Hi, Whoa man... you seemed to have done lot of research. R is preferable because it is open source, which translates to more 'open and collaborative' user groups on the internet. I talked to hedge fund programmers and there is absolutely nothing which matlab can achieve but R cannot. Collaborating with other people can be very helpful. It makes the learning experience easier and enjoyably. A lot of quant students use R so it is easier to make friends who can share their libraries with you. R has more resources online than matlab. Though you have acquaintances who will help you with matlab, the other option could be equally viable. I'll suggest start with 1-minute data. Since you are not scalping, it should be good enough. I've not tried, but a friend who recently got started in R says it is relative easy. Here are some resources: dataset - Data APIs/feeds available as packages in R - Statistical Analysis - Stack Exchange Modern Toolmaking: Backtesting a Simple Stock Trading Strategy: Part 3 Cheers, DD
-
Open Source Trading Platforms (Master List)
Do Or Die replied to Do Or Die's topic in Tools of the Trade
Encog Encog Java and DotNet Neural Network Framework | Heaton Research Encog Ninjatrader Getting Started - Encog Machine Learning Framework Encog is an advanced neural network and machine learning framework. Encog contains classes to create a wide variety of networks, as well as support classes to normalize and process data for these neural networks. Encog trains using multithreaded resilient propagation. Encog can also make use of a GPU to further speed processing time. A GUI based workbench is also provided to help model and train neural networks. See wiki above for using with NinjaTrader -
the portraits look so cool! (click to enlarge)
-
I'm planning to take CQF course. ALL quants I've met would go with R or MATLAB rather than any retail applications. There are great packages and active web groups which could help you getting started in R w.r.t. trading models.
-
This follows from the discussions Trading Regime Analysis Using RSI Trading on daily time frame: Using RSI(10) and look back period of 25 bars Buy when the RSI suggests uptrend AND it bounces off from 40-50 level Trade delay is applied with buying at next bar open for realistic trades Initial stop is (Low of Buy bar - twice average bar range) ; protective stop of 15% throughout the trade Sell when stop is hit or RSI changes trend. Long-only, because on daily time frame speed of downtrend tends to be much higher than uptrend, and so symmetric conditions for Long/Short do not work Tested on a random sample of around 75 stocks. Max open positions are 4 and 25% of equity per trade No optimization at any stage Trade log for the same stock discussed in previous thread- PEP is attached. Result: Net % Profit:358.7% Exposure %:69.69 CAR:18.82% Max. Sys Drawdown -29.38% # Trades:165 % of Winners:43 % of Losers:57 Trading on Intraday (1-minute) time frame: Using RSI(10) and look back period of 25 bars Same Buy/Sell rule as above Symmetric Short/Cover rules applied All trades initiated after 10 and closed by 3:45 Entry delayed by open price of next bar after signal, to account for slippage; other trading costs excluded Tested for past six weeks on same list of stocks Trade log for AAPL as discussed here is attached. Net % Profit:10.44% Exposure %:66.39 CAR:159.64% Max. Sys Drawdown -5.05% # Trades:814 % of Winners:36.61% of Losers:63.39% PEP trades.xls AAPL intraday trades.xls
-
+1 ------------------------------------ +1
-
I separated the above Trending component in bear and bull parts; now the results are even better. It works good with lookback period (lag) of 30 bars.
-
Its rather easier to code the same thing without any future looking formula; I just did. Compare the char above with the one posted in first post. Works satisfactory even with a lag of 50 bars; though I would prefer going discretionary with this method.
-
Here is most of the discussion plotted as an indicator. It has a lag of 50 bars; but even with that it gives an edge if one takes the regimes into consideration for trading.
-
Anyone Know About Quantitative Analysis?
Do Or Die replied to Josh7's topic in Market News & Analysis
Quantitative Analysis is a myth. The job of a quant has little to do with directional trading. See here QuantNet Community CQF from 7city is a great course for distance learning. You are likely to find 10% of what they teach as relevant to trading. -
High-Frequency Trading by Peter Gomber, Björn Arndt, Marco Lutat, Tim Uhle :: SSRN The research at hand aims to provide up-to-date background information on HFT. This includes definitions, drivers, strategies, academic research and current regulatory discussions. It analyzes HFT and thus contributes to the ongoing discussions by evaluating certain proposed regulatory measures, trying to offer new perspectives and deliver solution proposals.
-
System Design Exercise for those interested.
-
Hi, This follows from Three Steps in Trading System Design. I will start with a rotational trading system as example. Hopefully this thread will help some people to get started; and, some others to share their experiences in improving the system design process itself. Step 1: Set of Premise "The sector ETF which is outperforming the market is likely a buy candidate; vice versa for shorts." "Take only Long trades in a bull market, and only Short trades in a bear market." Step 2: Taking the Premise to market - Watchlist: XLB, XLY, XLP, XLE, XLF, XLV, XLI, XLK, XLU - Relative Strength will be calculated as Returns(ETF)- Returns (S&P500) over past 30 days - Each day the rank of ETFs is calculated, based on it's RS. The portfolio is adjusted each day to keep the top two best and worst performers as long and short respectively. - To identify a bull/bear market, a simple filter is the change in prices over past 6 months. I use the filter current Close- Close(125 days back) > 0 - Protective stops are applied, say 2% We see two immediate problems at this stage: 1. Rank volatility, which results in too frequent trades. 2. Since the strategy picks up ETFs with strongest momentum, it may pick one immediately after a upward spike or parabolic upmove. Trades frequency can be adjusted using three ways: 1.) Exit a trade only on new week / month 2.) Different criteria for Buy and Short, as well as exit 3.) Smooth the rank over some bars 4.) Combination of above Using the simplest of all, i.e. to exit a trade only on a new month, the strategy shows some profits. I will continue after input from members, Amibroker code is attached. roational-rudimentary.txt
-
QuantShare looks another great software and yet cheap. Data management is very easy with it: http://www.quantshare.com/sa-15-simulator
-
2-minute What I mean by premise is "an observation about market behavior". So by default it cannot be indicator based. For example, "Buying on bullish divergence with RSI" is not a premise. The fundamental premise is "Buy when the internal relative strength of a stock increases even though the prices keep touching lows." See this thread for even a more detailed discussion. In Step 2 when you mathematically define this premise it becomes a model or an indicator. (this is reverse how most people learn). In Step 1 there is nothing but plain English.
-
For the uninitiated, the first question will be why do they need to go with an open-source project (OSP) after all? OSP can in no way compete with the support and timely updates of a commercial platform. The answer depends on your needs. A retail commercial platform such as Amibroker on Ninjatrader shall be able to address most of your requirements. But everything has limitations, and because their source code is proprietary, it can be hard to extend their capabilities. This is where people invest time/money to trade with an OSP. I started looking at options with the need to connect Amibroker with Sterling API. I will be updating this list regularly, please add your comments. tradelink http://code.google.com/p/tradelink/ Write automated trading systems, connect with 17+ broker APIs AIOTrade http://sourceforge.net/projects/humaitrader AIOTrade (formerly Humai Trader Platform) is a free, open source stock technical analysis platform built on pure java. manticore-trader http://www.manticore-projects.com/ manticore-trader is a free and open java software for day trading warants on stocks, currencies and comodities. It includes modules for charting, position and risk management, automatic ordering and system trading. Instruments and quotes of the main financial markets are provided daily G-BOT http://www.datatime.eu/public/gbot/ G-BOT is a public academic project, headed by Prof. Tom Gastaldi (first University of Rome "La Sapienza"). The project is about the study of trading algorithms and fully automated strategies for systematic profitability. Marketcetera http://trac.marketcetera.org/ http://www.marketcetera.com/ Marketcetera focuses on building the key trading functions that are common to all organizations, thus freeing our clients to concentrate on proprietary trading algorithms and other specialized software that provide a competitive advantage. Merchant of Venice http://sourceforge.net/projects/mov http://mov.sourceforge.net/ MOV is a stock market trading programme that supports portfolio management, charting, technical analysis, paper trading and genetic programming. Venice runs in a graphical user interface with online help and has full documentation. EclipseTrader http://sourceforge.net/projects/eclipsetrader/ http://eclipsetrader.sourceforge.net/ Eclipse Rich Client Platform (RCP) application featuring shares pricing watch, intraday and history charts with technical analysis indicators, level II/market depth view, news watching, and integrated trading. JBookTrader http://code.google.com/p/jbooktrader/ All aspects of trading, such as obtaining market prices, analyzing price patterns, making trading decisions, placing orders, monitoring order executions, and controlling the risk are automated according to the user preferences. JBookTrader is a "sister" project to JSystemTrader. Matrex http://sourceforge.net/projects/matrex/ http://matrex.sourceforge.net/ The perfect desktop tool for mathematical, statistical models and complex calculations. Adapters to matlab, scilab, octave, R. OpenGamma http://www.opengamma.com/ OpenGamma provides technology for financial institutions to improve analytics calculation and delivery to front-office and risk users. Open Java Trading System (Last Update 2010-08-14) http://sourceforge.net/projects/ojts/ http://ojts.sourceforge.net/ The Open Java Trading System (OJTS) is meant to be a common infrastructure to develop (stock) trading systems. There are four parts: gathering of raw data over the internet, recognition of trading signals, a visualization module and trading with banks. Joone http://sourceforge.net/projects/joone/ Joone is a neural net framework written in Java. It's composed by a core engine, a GUI editor and a distributed training environment and can be extended by writing new modules to implement new algorithms or architectures starting from base component Data Visualizer (Last Update 2009-07-17) http://sourceforge.net/projects/dataviews http://dataviews.sourceforge.net/ Modular environment for graphical visualization of stock market type data SFL Java Trading System Enviroment (Last Update 2009-07-17) http://sourceforge.net/projects/sfljtse http://www.sflweb.org/index.php?blog=sfljtse Java application built on KISS principle ( Keep It Simple,Stupid ) and its aim is to provide a fast and platform indipendent infrastructure to develop and execute trading systems. ActiveQuant (Last Update 2009) http://www.activequant.org/ Somewhat heavy stuff, for proficient programmers only JSystemTrader (Last Update 2009) Developed to work with Interactive Broker’s API, fully automated trading system (ATS) that can trade various types of market securities during the trading day without user monitoring. Market Analysis System (Last Update 2009-07-17) http://sourceforge.net/projects/eiffel-mas http://eiffel-mas.sourceforge.net/ System for analysis of financial markets using technical analysis. Includes facilities for stock charting and futures charting, as well as automated generation of trading signals based on user-selected criteria. Operates on both daily and intraday data. Oropuro trading system (Last Update 2009) http://sourceforge.net/projects/oropuro http://www.oropuro.org Complete technical analysis & trading system, full set of features: retrieve, analyze EOD stocks data; manage multiple portfolios; technical analysis & graphical rendering; neural networks for generation of trading signals; support trader community,
-
I've been using Amibroker's CMAE engine for rolling backtests and walk forward optimization for over a year now. It's way faster than anything I've seen. The cmae algo 'converges' very fast, and may take 1/50th of the time of an normal exhaustive optimization.
-
You sound experienced. Welcome to TL! which markets do you trade?