Author Topic: Quantitative Analysis and Related Software  (Read 6954 times)

Stubbleman

  • 5 O'Clock Shadow
  • *
  • Posts: 16
  • Age: 36
  • Location: AZ
Quantitative Analysis and Related Software
« on: February 17, 2012, 01:16:55 PM »
Does anyone here dabble into quantitative analysis?

I come from an mathematics and engineering background and quantitative analysis is one of the few investment avenues that aligns well with my sensibilities.  The majority of investment books and articles strike me as opinion with a few out of context examples tossed in, rather than well researched logic.

Some examples are the never ending growth vs value investing arguments, or dividends vs capital appreciation, small cap vs large cap, dollar cost averaging vs market timing etc.  Each side uses simplistic examples that support their argument.

Quantitative Analysis attempts to use math, sometimes very high level, to attempt to find situations in the markets that can be exploited for profit. 

Anywho, I've recently started exploring the field.  Does anyone have any experience?

A few months ago I went looked for a dedicated analysis package and stumbled on some software called Amibroker (http://www.amibroker.com/).  The software allows you to backtest trading and investment ideas on historical security data.  For example you can easily backtest dollar cost averaging into an index fund.  It will return your profit, volitily and just about any other metric you can think of.  You can even program custom metrics.

There are a large number of programs similar to Amibroker, BUT Amibroker is only $199 compared several thousand dollars for other popular programs.  To flex your mustachianism you can use free historical End of Day data from Yahoo! rather than paying a data service.  Additionally Amibroker appears to be much more powerful.  You can implement any trading or investing scheme you can think of, if you can program it.

There are a couple of downsides to Amibroker.  The learning curve is pretty steep.  It takes atleast basic programming knowledge to get started.  Unfortunately Amibroker does not have a built in debugger for AFL, the native array based programming language Amibroker uses.  This makes troubleshooting code difficult at times.

Support from the developer and user community is astounding.  Amibroker allows plugins and the use of other programming languages through those plugins.  You can also import/export data from R, an open source statistcal package.

Lately I have been focusing on forming my Mustache rather than my investment skills because I realized spending hours and hours developing investment skills is useless if you don't have any spare money to invest!  But with my Mustache firmly in place I plan to dive back into determing my long term investment strategy using statistical analysis and backtesting from Amibroker. 

I would love to hear from others who have experience with this sort of thing.


mmmsc

  • 5 O'Clock Shadow
  • *
  • Posts: 22
  • Location: Sidney BC Canada
Re: Quantitative Analysis and Related Software
« Reply #1 on: February 17, 2012, 05:36:31 PM »
Not to be to cheeky but Why? There are plenty of Wall St firms using the finest minds and latest software to do this analysis. None historically have beat the market for any extended period of time that I am aware of. (Please no charts showing so and so beat the market short term ie: under 10 years). The problem with the past and therefore the analysis of said data is that it has only has a rough correlation and certainly no predictive values of the future. I would suspect that most of these firms are involved in speculation  (market timing and other short term nonsense) and not investing. If you are looking to invest in specific businesses or groups of businesses then this type of analysis is overkill. A sound value oriented analysis is enough and yes there are sensible buys in almost every market.

Save your money

Buy great businesses and let them make you more money.

Simple does work (paraphrasing  Mr Occam)

Stubbleman

  • 5 O'Clock Shadow
  • *
  • Posts: 16
  • Age: 36
  • Location: AZ
Re: Quantitative Analysis and Related Software
« Reply #2 on: February 17, 2012, 06:33:57 PM »
What is value oriented analysis based on?  Historical inferences.  The PE ratio has no real connection to the value of a company, same with PEG or any other ratio/metric.  Their effectiveness is based purely on observation.  There is no grand Theory of PE ratio that states for absolute certain companies can't exceed a certain ratio.  In fact one could argue that the PE ratio derives it's value from people believing it makes a difference.  Simply using these metrics implies you believe in historical trends.

I'm of the opinion that any investment without a dividend or regular return to the owner is speculation irregardless of one's holding period.  Value or otherwise - you simply hope the price is going to go up in the future.  That is speculation.

This is not to say that fundamental analysis has no value.  Using amibroker, excel or any other numerical package you can back test your "sound value oriented analysis" criteria.  Say you have a set of criteria such as PEG Ratio less than three and quick ratio greater than one. Ask yourself: would this pair of requirements yielded gains in the past?  Software lets you quickly evaluate this question.  If the answer is a definitive no, would you consider it wise to invest using this method in the future?  If the answer is yes, then possibly you have a workable set of investment criteria.

You could also test whether requiring a PEG Ratio of 2 or less begets better performance than requiring a PEG Ratio of 3 or less and have actual data to back up your decision.

One more thought:  Modern engineered Stuff such as planes, op-amps, and power plants all are designed using statistics.  The statistics say that the wing on your plane won't fail with 99.9% certainty after 1000 hours of use.  Do you fly on planes?  These things would not exist if there was not a real, quantifiable connection between historical data and the future.

Physics

  • 5 O'Clock Shadow
  • *
  • Posts: 81
Re: Quantitative Analysis and Related Software
« Reply #3 on: February 17, 2012, 06:59:03 PM »
The market is not a physical system; planes, op-amps, powerplants, etc... all are. 

In the market you are competing against millions of other investors and you have to assume that many of them are much much smarter than you and have much much better quantitative tools.

I'm not against amateur quantitative analysis (and if you are not sharing time on a petaflop supercomputing cluster, you are an amateur) but don't believe that the ideas you come up with are not one of 1000s of others that are being compared and run every second against real time L3 data by your fellow investors.  Past performance is not a predictor of future performance for that very reason: everyone who is interested has access to that past data and is taking it into account in their decisions.

I love doing quant work myself, but I just rarely if ever make actual investment decisions based on historical stock data analysis.
« Last Edit: February 17, 2012, 07:05:26 PM by Physics »

Stubbleman

  • 5 O'Clock Shadow
  • *
  • Posts: 16
  • Age: 36
  • Location: AZ
Re: Quantitative Analysis and Related Software
« Reply #4 on: February 17, 2012, 07:25:39 PM »
How is value investing (Fundamental analysis) any different?  It isn't quantified, but it does use rules and you're still competing.

The market is a system.  The rules evolve, but it is still a system.  By using value investing guidelines you are using rules than are 100 years old or more and may or may not have ever applied.  How do you know if they don't?

The professional quants compete in near real time. There is no way an amateur with small amounts (Less than billions) can compete due to the structural costs of trading.  This not the world I'm talking about.  Nor am I talking about discovering some revolutionary trading method (although why not?).

I'm talking about analyzing long term investing strategies to determine validity.  Common investing wisdom suggestions dollar cost averaging is the way to go.  Is it really?  What evidence do you have?  What about index investing?  Does index investing work in a market that doesn't always go up?

I don't buy the argument that all possibly known information has been taken into account therefore there is no advantage to be found.  Humans simply don't work this way.  Besides, this nugget of "common knowledge" can equally apply to all forms of investing.

Someone smart once said that if you have a hundred thousand dollars to be investing, spending some time to earn an extra 1% return is very highly paid work.

mmmsc

  • 5 O'Clock Shadow
  • *
  • Posts: 22
  • Location: Sidney BC Canada
Re: Quantitative Analysis and Related Software
« Reply #5 on: February 17, 2012, 10:38:17 PM »
Value investing uses but is not Fundamental analysis. Value investing is not about competing in the market. It is about finding the best earnings for your dollar at an acceptable rate of risk going forward. P/E and other such ratios have limited if any use to a value investor as they look into the past. Value investors try and take a holistic view of the future of a business. Fundamental analysis shows where you are at and where you have been at this instant of time. It is but a single data point but not the only one to look into by any means.

The "rules" of value investing maybe old but that hardly negates their effectiveness. Newtonian physics is three hundred years old but still is accurate enough that only minor revisions are needed to determine the exact position of the moon at any given time. (The revisions are also almost one hundred years old too).

Index investing, dollar cost averaging, asset allocation and other strategic investing methods work for most people because they reduce risk. Is it the way to get the greatest yield? No but it does tend to manage the risk (deviation/variability) which allows most to sleep at night. The greatest yield will only be obtained by picking one investment(?) and placing all bets (terms used on purpose) on one horse until a better one comes along. Risky (high variability). Yep. The best strategy for you may not be for me. There have been countless studies done on almost all aspects of investment strategies. Most are widely available. Caution should be encouraged as some are manipulated to prove an authors theory, although deeper digging will will get the data you seek.

I, like you, do not buy the efficient market theory. I believe most if not all relevant information is available but gets into trouble with the "taken into account"  portion of the equation. What do the Greek fiscal problems have to do with ABC ltd selling widgets in Kansas? So why does its value(share price according to investors/speculators)drop or rise along with the rest of the market in dramatic fashion with the latest news? Is it not more important to look at the future competitive advantage ABC has (or doesn't)? Is there going to be demand in the future for their products/services? Am I getting a fair return of profits for the risk I am being asked to assume for my dollar?


Stubbleman

  • 5 O'Clock Shadow
  • *
  • Posts: 16
  • Age: 36
  • Location: AZ
Re: Quantitative Analysis and Related Software
« Reply #6 on: February 18, 2012, 07:38:46 AM »
I largely agree with you mmmsc.  And use value investing myself.  However I prefer to try and quantify things as much as possible to remove emotion and judgement.  Most people don't have good judgement when it comes to making the final call to buy or sell.

Amibroker has a free demo, no time limit or anything.  It just won't save symbols you downloads.  Give it a whirl.  You can download data from Yahoo and see just how correlated most asset classes were during that time frame.  Heck, some things are still strongly correlated.

At the very least it is a hugely capable graphing program.  I don't have any stake in Amibroker, I just find it incredibly useful.


Stubbleman

  • 5 O'Clock Shadow
  • *
  • Posts: 16
  • Age: 36
  • Location: AZ
Re: Quantitative Analysis and Related Software
« Reply #7 on: February 18, 2012, 07:43:25 AM »

The "rules" of value investing maybe old but that hardly negates their effectiveness. Newtonian physics is three hundred years old but still is accurate enough that only minor revisions are needed to determine the exact position of the moon at any given time. (The revisions are also almost one hundred years old too).


P.S.  The market is a very different beast from a few masses circling one another in space.  The rules of the market, unfortunately, do change.  Value investing will always involve a certain degree of judgement.  What appears cheap today might appear very expensive at the same ratios tomorrow if something drastic changes in the market, like in 2008.

Something else to chew on:  Volatility increases with holding time. 

mmmsc

  • 5 O'Clock Shadow
  • *
  • Posts: 22
  • Location: Sidney BC Canada
Re: Quantitative Analysis and Related Software
« Reply #8 on: February 18, 2012, 10:54:33 AM »
I don' know from what I have seen the masses (talking heads) circling space (markets) seem like a pretty good parable ;). All things that involve choice must involve judgement. The key is where you place that judgement, on the past or in the future, on the whims of others or the prospects of a business. Why do you think volatility increases with time? Volatility in this sense is the short term movement (share price) around a median (earnings). If you can predict future earnings (the tough part) the share price will/must follow adjusted of course by the psychology (P/E ratio) of the market. I would suggest that volatility decreases with time as you achieve more and more data points within the standard deviation and less outside.

Stubbleman

  • 5 O'Clock Shadow
  • *
  • Posts: 16
  • Age: 36
  • Location: AZ
Re: Quantitative Analysis and Related Software
« Reply #9 on: February 24, 2012, 01:25:37 PM »
I guess it depends on how you want to define volatility. 

Basically the longer you hold a security, the more likely you will experience a very large drawdown.  If you buy and hold for one day, it is very unlikely that the price would drop by 20%.  But it is quite likely there will be a drop of .5%.  However if you hold for two days, you have increased your exposure.  If you extrapolate to 10 years a 20% drawdown is pretty much guaranteed.  Market history supports this.

Why is this a problem?  Because for every drop you need larger gain to simply get back to even.  If you purchase an equity and experience a 50% drawdown in price you will require a subsequent 100% gain to return to the original price.  Long holding periods are risky.

All that said, I still buy and hold with nearly all my investments.  But the shorter term trades made possible by QA intrigue me.

mmmsc

  • 5 O'Clock Shadow
  • *
  • Posts: 22
  • Location: Sidney BC Canada
Re: Quantitative Analysis and Related Software
« Reply #10 on: February 25, 2012, 05:59:34 PM »
I think where you are making a mistake in your reasoning  is that you are not buying and holding for one day but a series of one days (or any other short term) that still equals ten years and therefore carries the same 20% swing risk. I am assuming here that you do not have a crystal ball and miss the days where a market nose dives ( or shoots upwards). The standard deviation from the intrinsic value of an investment over one day in the market is far far greater than the deviation over say the last 60 years (something like a investing lifetime).

Please don't take me the wrong way. I do wish you great success it is just that I have seen a lot of very smart people take this same course and end up having to delay their plans for the future because they figured they were smarter than  the market.


Stubbleman

  • 5 O'Clock Shadow
  • *
  • Posts: 16
  • Age: 36
  • Location: AZ
Re: Quantitative Analysis and Related Software
« Reply #11 on: February 28, 2012, 06:02:35 AM »
In order to make your generalization one must assume the system is never out of the market.  If that were true, why not just buy and hold?

Don't forget about the risk of holding over night, weekends and extended hours trading.  News during these periods can move the market significantly.

I think all investment methods have merits and downfalls.  It can boil down to a matter of taste.  Just like in life, there is no one correct way.



mmmsc

  • 5 O'Clock Shadow
  • *
  • Posts: 22
  • Location: Sidney BC Canada
Re: Quantitative Analysis and Related Software
« Reply #12 on: March 08, 2012, 10:26:15 PM »
It is true that all investment methods have good and bad points. It is also true there is not just one correct way however within those boundaries there is a wide variation in results.

I do not believe taste should come into it. I believe the studies have shown that for most people most of the time vanilla works. Vanilla produces the largest average overall gain when applied over long periods. These gains have in the past been exceptional. Has a small percentage of people been able to beat these gains. Yes. It is a small minority and most that try end up losing very badly to the vanilla approach.

thenurse

  • 5 O'Clock Shadow
  • *
  • Posts: 1
Re: Quantitative Analysis and Related Software
« Reply #13 on: August 04, 2017, 03:32:58 PM »
I invest only a little part of my modest salary for long time and have a satisfy gain.
I don't like this overcharged "investment" websites, which have the beautiful charts, which say nothing.
Good advice is expensive.
I don't want invest my money in finacial guidance. I want invest it in promising stocks.
I pick my candidate myself with a dash of foresight, market psychology and quantitative analysis facts.
I don't have the equipment (tools) for analysis.
I use different websites. One of this is https://www.quantanal.net.
A very fast, little, old-school, non-commercial and independent website.
I like it.

SeattleCPA

  • Handlebar Stache
  • *****
  • Posts: 1324
  • Age: 59
  • Location: Redmond, WA
    • Evergreen Small Business
Re: Quantitative Analysis and Related Software
« Reply #14 on: August 04, 2017, 04:15:40 PM »
Stubbleman, I can't recommend highly enough both of David Swensen's books on investing... Unconventional Wisdom Success talks to individual investors and Pioneering Portfolio Management talks to institutional investors.

Swensen and his team at Yale, BTW, are who you'll be competing against if you decide on an active management strategy... so good to know who you're playing ball with...
« Last Edit: August 04, 2017, 10:32:32 PM by SeattleCPA »

doggyfizzle

  • Bristles
  • ***
  • Posts: 344
Re: Quantitative Analysis and Related Software
« Reply #15 on: August 04, 2017, 04:26:27 PM »
Not to be to cheeky but Why? There are plenty of Wall St firms using the finest minds and latest software to do this analysis. None historically have beat the market for any extended period of time that I am aware of.

You should look at Renaissance Technology.  Started by a bunch of IBM machine learning and linguistics scientists and they have absolutely crushed the market since inception (35 years) at roughly 30% per year.  Interestingly enough, the firm has almost $70 billion in AUM, most of which belongs to employees.

SeattleCPA

  • Handlebar Stache
  • *****
  • Posts: 1324
  • Age: 59
  • Location: Redmond, WA
    • Evergreen Small Business
Re: Quantitative Analysis and Related Software
« Reply #16 on: August 04, 2017, 07:42:03 PM »