Hello monks,
I am working on a project to analyze stock purchases. It's been an ongoing process and I have occasionally had to ask advice of the monks who have been extremely helpful, thanks!
Specifically,.....
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, maybe even overkill, 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.
Other monks have suggested that PDL may be the way to go. At this point I need to make a recommendation on what kind of expert to hire. We are storing all of our data in MySQL.
Many thanks for this and for previous advice I have gotten on this question.
J
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.