GetStockData is designed to work with the outputs of the OShaughnessey.m stock valuation script. It is a simplified way to recall and display data for any given ticker symbol. Additionally, not specifying a ticker - i.e. calling GetStockData - will return the outputs of OShaughnessey.m.
Example:
Recall the data for Apple, Inc. Stock ticker 'AAPL'.
GetStockData('AAPL')
returns:
Ticker Symbol: AAPL, $530.38
Apple Inc.
P/E: 12.93 P/E Rank: 76.4101
P/S: 3.48 P/S Rank: 32.3465
P/B: 4.84 P/B Rank: 32.3465
P/fcf: 11.12 P/fcf Rank: 88.6725
Div: 0% Div Rank: 19.7414
EV/EBITDA: 8.78 EV/EBITDA Rank: 61.3898
6 month price momentum: 37.84%
Overall Rank: 300.4674 Percentile: 48.551%
Cite As
Justin (2026). GetStockData.m (https://uk.mathworks.com/matlabcentral/fileexchange/46817-getstockdata-m), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
