Two Plus Two Newer Archives  

Go Back   Two Plus Two Newer Archives > Other Topics > Business, Finance, and Investing
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #31  
Old 11-07-2007, 01:38 PM
DcifrThs DcifrThs is offline
Senior Member
 
Join Date: Aug 2003
Location: Spewin them chips
Posts: 10,115
Default Re: Market Model Thingy

[ QUOTE ]
The function pinv calculates the pseudoinverse:

matlab link

Sometimes the matrix inv(A'*A) has a determinant that is close to 0, so it close to non invertible. In this case there could actually be a family of vectors that minimizes the least-squares distance.

Matlab points this out by warnings...something about the condition number too high. If matlab is fine with regress (no warnings), then regress is ok.

In financial application this happens sometimes when you have inputs that are highly correlated...I guess it's ok if you have a lot of inputs, like in OP-s case.

[/ QUOTE ]

thanks. the stuff i have in matlab hasn't caused any errors like the one you mention.

for the future though that is very helpful.

does any other "fixes" come to your mind regarding data analysis in matlab? like something along the pinv type fix?

thanks again,
Barron
Reply With Quote
  #32  
Old 11-07-2007, 03:05 PM
CallMeIshmael CallMeIshmael is offline
Senior Member
 
Join Date: Dec 2004
Location: Tis the season, imo
Posts: 7,849
Default Re: Market Model Thingy

CC,

I did a similar test, where I just had the program select random picks each day, and it showed the expected ~100% loss (expected after the ask/bid discount and fees)

I did have the concern that you raised, re: most picked stocks are babies, and the transaction fees are going to be killer. However, I looked through it, and the 25/50/75 percentiles were pretty reasonable (something like [11 16 24], but I cant remember exact details now).

If I were to rerun it, getting rid of all stocks < X, what is a good X?



Also, Ive used pinv since v early on, when my regular method produced a warning.
Reply With Quote
  #33  
Old 11-08-2007, 04:44 AM
crazy canuck crazy canuck is offline
Senior Member
 
Join Date: Sep 2002
Location: Longueuil, Quebec
Posts: 1,516
Default Re: Market Model Thingy

[ QUOTE ]

does any other "fixes" come to your mind regarding data analysis in matlab? like something along the pinv type fix?

[/ QUOTE ]

Can't think of a major fix right now.

If there are higly correlated inputs one could also use Principal components analysis (PCA)

Here is the Matlab link:

matlab

There are lot of good tutorials on it online.

One interesting anecdote (this is not first hand - you might be able to verify or deny it) I read at wilmott was that DE Shaw used it as their first strategy to trade a basket of stocks, becasue some of the components were predictable. But since then, it has been eliminated.

Once I checked out the strategy on one sector and it was seemed pretty useless.

So it is unlikely that OP's strategy would be very scaleable....but maybe he is onto something.
Reply With Quote
  #34  
Old 11-08-2007, 05:33 AM
crazy canuck crazy canuck is offline
Senior Member
 
Join Date: Sep 2002
Location: Longueuil, Quebec
Posts: 1,516
Default Re: Market Model Thingy

[ QUOTE ]

If I were to rerun it, getting rid of all stocks < X, what is a good X?

[/ QUOTE ]

I don't know exactly...I wish someone else who traded/trades small caps would reply. I'm actually very curious about it because I built systems that work on small stocks, but have no idea how useful they are...didn't get to trade it/pursue it further because I'm at school full time, and publishing is my first priority.

My guess is that you could start with a market cap of 300 million (disregard stocks below it), and work your way down from there....but this is just a rough guess.

To get a more definitive answer, look at the minimum daily volume, and bid-asks during the day...even yahoo has it. Then, you can get an approximate feel for the transaction cost, but even this is industry dependent.

For example this company has a market cap of over 100 million, stock price of $2:

[url=http://finance.yahoo.com/q/hp?s=ACPW]yahoo finance[/url ]

and minimum daily volume of 35000. So you might be running into high transaction costs when you want to trade over 2000 shares (or even less), or $4,000. Again, I wish someone would give a more definite answer.

Therefore, the answer also depends on how much money you would trade.

It is possible that you can make 50% annual returns while your bankroll is below 100k (these numbers are just illustrative), but obviously you'd hit that mark pretty quickly. So the system would not be scaleable in the end (not valuable for a hedge fund), but of course that'd be still pretty good.
Reply With Quote
  #35  
Old 11-08-2007, 11:27 AM
DcifrThs DcifrThs is offline
Senior Member
 
Join Date: Aug 2003
Location: Spewin them chips
Posts: 10,115
Default Re: Market Model Thingy

[ QUOTE ]
[ QUOTE ]

does any other "fixes" come to your mind regarding data analysis in matlab? like something along the pinv type fix?

[/ QUOTE ]

Can't think of a major fix right now.

If there are higly correlated inputs one could also use Principal components analysis (PCA)

Here is the Matlab link:

matlab

There are lot of good tutorials on it online.

One interesting anecdote (this is not first hand - you might be able to verify or deny it) I read at wilmott was that DE Shaw used it as their first strategy to trade a basket of stocks, becasue some of the components were predictable. But since then, it has been eliminated.

Once I checked out the strategy on one sector and it was seemed pretty useless.

So it is unlikely that OP's strategy would be very scaleable....but maybe he is onto something.

[/ QUOTE ]

yea i'm familiar w/ PCA. very useful way to analyze large data sets. that is the methodology that really proved to me that eigenvalues/vectors are useful [img]/images/graemlins/smile.gif[/img]

interesting stuff about DEShaw using it initially. understandable that it can't be used anymore.

thanks for your inputs.
Barron
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:33 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.