Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Is Matlab overkill for this financial need?

Subject: Is Matlab overkill for this financial need?

From: Jim

Date: 31 Jul, 2010 23:42:05

Message: 1 of 2

Hello Matlab folks, I have a question and the answer may be be so glaringly obvious that I feel the need to apologize ahead of time if indeed it is. I am a Perl/Python person by training and have never used Matlab (although it does intrigue me)

I am working on a project to analyze stock purchases. That is to say...
X person makes a stock purchase on given date
X person makes another stock purchase of the same stock on given date
X person sells Z number of shares on a given date.......
......
......

Generally the info would look need to come out looking like this (CSV delimited)
stock,transDate,action,price,numberShares,closingPrice,gain,cumulativeVal,portfolioShares,avgPriceShare,portfolioPctChange
LNUX,1/1/10,Bought,$1.00,1000,$1.00,"-$1,000.00","$1,000.00",1000,$1.00,0.00%
LNUX,1/15/10,Bought,$1.50,1000,$1.50,"-$1,500.00","$3,000.00",2000,$1.25,16.67%
LNUX,1/31/10,Sell,$1.75,500,$2.00,"$1,000.00","$3,000.00",1500,$1.25,62.50%

Items in the above example that would need to be calculated include things like avgPriceShare and portfolioPctChange. These represent average price per share and the amount of the portfolio change since the last calculation.

We need to calculate this on about 25,000 accounts so any sort of solution would need to lend itself to batch processing (running on Linux). It seems like this sort of matrix calculation might be child's play for MatLab given what I've seen about it. It may even be possible in Excel but I don't want to use a Microsoft solution if I don't have to since we don't use Microsoft anywhere in the enterprise.

Can any MatLab power users shed any light on this?

Many thanks!
Jim
Flames go quietly to /dev/null

Subject: Is Matlab overkill for this financial need?

From: William

Date: 1 Aug, 2010 00:25:08

Message: 2 of 2

"Jim " <craigscvg+nospam@gmail.com> wrote in message <i32ccd$hm4$1@fred.mathworks.com>...
> Hello Matlab folks, I have a question and the answer may be be so glaringly obvious that I feel the need to apologize ahead of time if indeed it is. I am a Perl/Python person by training and have never used Matlab (although it does intrigue me)
>
> I am working on a project to analyze stock purchases. That is to say...
> X person makes a stock purchase on given date
> X person makes another stock purchase of the same stock on given date
> X person sells Z number of shares on a given date.......
> ......
> ......
>
> Generally the info would look need to come out looking like this (CSV delimited)
> stock,transDate,action,price,numberShares,closingPrice,gain,cumulativeVal,portfolioShares,avgPriceShare,portfolioPctChange
> LNUX,1/1/10,Bought,$1.00,1000,$1.00,"-$1,000.00","$1,000.00",1000,$1.00,0.00%
> LNUX,1/15/10,Bought,$1.50,1000,$1.50,"-$1,500.00","$3,000.00",2000,$1.25,16.67%
> LNUX,1/31/10,Sell,$1.75,500,$2.00,"$1,000.00","$3,000.00",1500,$1.25,62.50%
>
> Items in the above example that would need to be calculated include things like avgPriceShare and portfolioPctChange. These represent average price per share and the amount of the portfolio change since the last calculation.
>
> We need to calculate this on about 25,000 accounts so any sort of solution would need to lend itself to batch processing (running on Linux). It seems like this sort of matrix calculation might be child's play for MatLab given what I've seen about it. It may even be possible in Excel but I don't want to use a Microsoft solution if I don't have to since we don't use Microsoft anywhere in the enterprise.
>
> Can any MatLab power users shed any light on this?
>
> Many thanks!
> Jim
> Flames go quietly to /dev/null





Im not sure what you mean exactly by overkill. It will make processing thousands of calculations in a fairly short simple code possible. Assuming this information is already recorded into some type of data file it will also make directly calling these values and making these calculations fairly simple. You could also make these calculations however frequently you wanted (perhaps online investment application if you were making that many transactions.). Hope this helps some.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us