NexusFi: Find Your Edge


Home Menu

 





Software for basic statistical analysis?


Discussion in Platforms and Indicators

Updated
      Top Posters
    1. looks_one sysot1t with 3 posts (1 thanks)
    2. looks_two Lornz with 3 posts (5 thanks)
    3. looks_3 Timot with 3 posts (0 thanks)
    4. looks_4 MXASJ with 2 posts (2 thanks)
    1. trending_up 7,484 views
    2. thumb_up 8 thanks given
    3. group 5 followers
    1. forum 15 posts
    2. attach_file 0 attachments




 
Search this Thread

Software for basic statistical analysis?

  #1 (permalink)
 Xyzzy 
Seattle, WA
 
Experience: Advanced
Platform: MultiCharts
Broker: IB/IQFeed
Trading: ES
Posts: 24 since Dec 2010
Thanks Given: 27
Thanks Received: 22

I've been using the Portfolio Backtesting features of MultiCharts, and I'm liking it quite a bit. However, it's limited in that it can only backtest 100 symbols at a time. Also, sometimes I feel like I'm throwing spaghetti at the wall to see what sticks -- I'm following recommended strategies based on "conventional wisdom" from technical analysis books, many of which seem to be completely useless, and optimizing lots of parameters to see what works (with the risk of curve fitting).

I'm looking for something a bit different, namely software to do some "what if" statistical analysis of strategies across a broader universe of symbols (e.g., all of the symbols on the NYSE). I'd like to be able to test certain strategies or patterns to see if they correlate with a positive outcome. This seems to be somewhat different than backtesting -- I don't want to know how much money I would have made or lost on a particular strategy, but instead the statistical correlation between a certain event and a certain outcome.

E.g., what if I go long when the 3 SMA crosses over the 9 SMA on daily bars and the price is above the 200 SMA? Or, what if I go short 30 minutes after the market open on a gap down day, and close at the end of the day? I'd like to know in either case how often, on a percentage basis, the price rises or falls after a certain period on a percentage basis, and the degree of correlation.

I could probably hack together something in Excel, but I'm hoping that I don't have to reinvent the wheel. I also know about more sophisticated software like Matlab and R, but from what little I know, they seem both quite complicated and rather "general purpose" -- I'd prefer to use something that's more geared towards technical analysis of financial markets, and I don't have a statistics background.

Does software like this exist? Many thanks in advance.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
REcommedations for programming help
Sierra Chart
Cheap historycal L1 data for stocks
Stocks and ETFs
Better Renko Gaps
The Elite Circle
Trend Direction Force Index (TDFI)
Platforms and Indicators
 
  #3 (permalink)
 
Lornz's Avatar
 Lornz 
Oslo, Norway
 
Experience: Advanced
Platform: CQG, Excel
Trading: CL
Posts: 1,193 since Apr 2010



Xyzzy View Post
I've been using the Portfolio Backtesting features of MultiCharts, and I'm liking it quite a bit. However, it's limited in that it can only backtest 100 symbols at a time. Also, sometimes I feel like I'm throwing spaghetti at the wall to see what sticks -- I'm following recommended strategies based on "conventional wisdom" from technical analysis books, many of which seem to be completely useless, and optimizing lots of parameters to see what works (with the risk of curve fitting).

I'm looking for something a bit different, namely software to do some "what if" statistical analysis of strategies across a broader universe of symbols (e.g., all of the symbols on the NYSE). I'd like to be able to test certain strategies or patterns to see if they correlate with a positive outcome. This seems to be somewhat different than backtesting -- I don't want to know how much money I would have made or lost on a particular strategy, but instead the statistical correlation between a certain event and a certain outcome.

E.g., what if I go long when the 3 SMA crosses over the 9 SMA on daily bars and the price is above the 200 SMA? Or, what if I go short 30 minutes after the market open on a gap down day, and close at the end of the day? I'd like to know in either case how often, on a percentage basis, the price rises or falls after a certain period on a percentage basis, and the degree of correlation.

I could probably hack together something in Excel, but I'm hoping that I don't have to reinvent the wheel. I also know about more sophisticated software like Matlab and R, but from what little I know, they seem both quite complicated and rather "general purpose" -- I'd prefer to use something that's more geared towards technical analysis of financial markets, and I don't have a statistics background.

Does software like this exist? Many thanks in advance.

You could check out the following sites:

The Most Advanced Tool for Analyzing [AUTOLINK]Price Action[/AUTOLINK] and Discovering Trading Systems

Trading System Lab

They will let you find patterns within predefined risk parameters, and that might be a good starting point for building a system. I assume MATLAB would be the best for your needs, but others can probably answer that better than me. I am not a strong coder, and I've found CQG IC to be sufficient for my simple backtests. The language is relatively intuitive, and the optimization is pretty good too.

Good Luck!

Visit my NexusFi Trade Journal Reply With Quote
  #4 (permalink)
 sysot1t 
 
Posts: 1,173 since Nov 2009

you can look at tradingblox builder.. it might fit your needs, they have a 10 day trial/demo.. you can also look at CQGIC backtester and signal evaluator, it might meet your needs as well.. and they have some rather great features that will even allow you to implement the ideas you test succesfully... you can get a 2 week trial...

you are already aware of matlab and R, so I wont bother mention them ... but they are usually one of the best tool for those statistically inclined that can code.

Reply With Quote
  #5 (permalink)
 MXASJ 
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 796 since Jun 2009
Thanks Given: 109
Thanks Received: 800

This may sound lame but here you go. What I do:

Where I don't want want to reinvent the wheel (or spend too much money) is on the tick database and a code library that can build time series from those ticks, and has most of the TA functions built in. For an off-the-shelf system that has that functionality I use Ninja Trader. But wait...

I'm not using it on its own.

I code my trade ideas to output data that can be exported to Excel/R/Matlab and do analysis outside of Ninja, so I am primarily using Ninja for its database, code functions, and ability to interface with a variety of data providers.

One of my primary tools I share here in the downloads section. Its a Ninja Strategy called ExportData. Take a look at this code snippet:

 
Code
case MyDateTime.CustomCode2:
{
//This is an example showing a trade signal bool being output.

int goLong = 0;
int goShort = 0;
if (CrossAbove(EMA(7), EMA(14), 1)) goLong = 1;
else goLong = 0;
if (CrossBelow(EMA(7), EMA(14), 1)) goShort = 1;
else goShort = 0;
 
string data = (Time[0].ToString("yyyy-MM-dd HH:mm:ss") + dataSeparator + Close[0] + dataSeparator + goLong + dataSeparator + goShort);
if (splitDateTime == true)
{
data = data.Replace(' ',dataSeparator);
}
 
sw.WriteLine(data);
break; 
}
That basically opens up in an Excel spreadsheet with four columns... DateTime, Closing Price and a Column each for GoLong or GoShort where a 1 or 0 represent a true/false bool state of the trade logic, which in this case is a 7/14 EMA cross.

I can use Ninja itself to manage the data and aggregate ticks into bars of varying periodcity.

The possibilities of what can be tested in this way is limited only by your imagination and coding skills. I've coded things to look at running PnL on portfolios so I can watch daily VAR, for example.

The free Statistics add-in to Excel is a good place to start if you wanted to look at things such as the Gap idea you mentioned. You would need to be able to express that idea in C#, probably with a bool variable output that indicates a winning or non-winning trade and a PnL. As you progress you may find you prefer to do some simple things in R or Matlab because they are better than Excel for certain things... but again using Ninja and its database as source of data.

The other thing Ninja is good for is static data management. Again something I don't necessarily want to build myself. Instrument Manager and Instrument Lists are very handy for this type of work. You could run your script against the S&P500, or if you have it, a list of everything traded at the NYSE.

For a free product (if you are not trading through it) Ninja is pretty cool. R is also free, and if you don't have Excel, OpenOffice is free. Where I spend money is on data. I'm an IQFeed subscriber.

I liked your comment:


Quoting 
I'm following recommended strategies based on "conventional wisdom" from technical analysis books, many of which seem to be completely useless

You are on the right path if you are testing and debunking things. This may come out the wrong way... but if you start with the idea that nothing works and you continue to test ideas to confirm that thesis, you might be pleasantly surprised one day and will have saved yourself some money and grief in the process.

Reply With Quote
Thanked by:
  #6 (permalink)
 sysot1t 
 
Posts: 1,173 since Nov 2009

@ MXASJ ... you should look at qcollector... less cumbersome to collect data with it..

QCollector Expert for DTN IQFeed

Reply With Quote
  #7 (permalink)
 dutchbookmaker 
NYC
 
Posts: 187 since Dec 2010

I think Trade Ideas is exactly for what you are talking about if you dont want to get into much code.
Trade-Ideas.com - Real-Time Stock Scanner and Market Alerts
Brett Steenbarger use to talk about it alot in his blog but I've never tried it.
It is in real time though and I think they supply the data so it is not the cheapest.

I think you could also do something crude in ninja, backtesting a strategy on a list of instruments and spitting out the % stuff to the output window.

Reply With Quote
  #8 (permalink)
 MXASJ 
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 796 since Jun 2009
Thanks Given: 109
Thanks Received: 800


sysot1t View Post
@ MXASJ ... you should look at qcollector... less cumbersome to collect data with it..

QCollector Expert for DTN IQFeed

I've tried that, and a new one not quite ready for prime time here: QuoteCore - Home.

But it is not just the raw market data I use. There are some useful event-driven methods in Ninja (and most trading platforms) that greatly reduce time-to-market for a trade idea. So I run ExportData not just to export data, but to run an ETL process on the data that does things the built-in backtesting engine can't do.

Reply With Quote
  #9 (permalink)
 sysot1t 
 
Posts: 1,173 since Nov 2009


dutchbookmaker View Post
I think Trade Ideas is exactly for what you are talking about if you dont want to get into much code.
Trade-Ideas.com - Real-Time Stock Scanner and Market Alerts
Brett Steenbarger use to talk about it alot in his blog but I've never tried it.
It is in real time though and I think they supply the data so it is not the cheapest.

I think you could also do something crude in ninja, backtesting a strategy on a list of instruments and spitting out the % stuff to the output window.

TIPro with OddsMaker is a good way to get quick results... I have to agree... a bit limited, but you can scan through a universe of stocks with a simple idea rather quickly and backtest that idea.

Reply With Quote
  #10 (permalink)
 Xyzzy 
Seattle, WA
 
Experience: Advanced
Platform: MultiCharts
Broker: IB/IQFeed
Trading: ES
Posts: 24 since Dec 2010
Thanks Given: 27
Thanks Received: 22


Thanks everyone for the great suggestions. The Odds Maker looks close to what I"m looking for, although it also doesn't seem to be as robust as I'd like in terms of entry and exit conditions.

The suggestions with NinjaTrader sound like a great idea. One downside with MultiCharts is that their backtesting module is limited to 100 symbols at the present (they're promising to expand that soon...), so I can't do a scan of a broad portfolio with hundreds or thousands of symbols. If NinjaTrader can do that, then that might be the ticket. I'll give it a try.

Started this thread Reply With Quote




Last Updated on October 29, 2011


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts