Stock Report

Generated: (NotebookTemplateExpression[DateString[] , General, ]) / Start date: (NotebookTemplateSlot["Start", "Start", Named, ])

Summary

tickers=#["Ticker"]&/@(NotebookTemplateSlot["Stocks", "Stocks", Named, ]);
properties={"Name","Sector","FloatShares","EarningsPerShare","High52Week","Low52Week"};

dataOrig=Module[{f},(Thread[f[#,properties]]&/@tickers)/.f->FinancialData];
data=Join[{Style[#,Bold]&/@Prepend[properties,"Index"]},Join[{tickers},Transpose[dataOrig]]//Transpose];
Style[
Grid[data,Frame->All,Alignment->Left,Spacings->{Automatic,1},ItemSize->Full],
FontFamily->"Verdana"
]

(NotebookTemplateSlot["Name", "", Named, ])

With[{metricToOpts={
{"High","Low"}->{Filling->{1->{2}}},
{"Open","Close"}->{Filling->{1->{2}}},
{"Return"}->{Filling->Axis},
{"CumulativeFractionalChange"}->{Filling->Axis},
_->{}
}},
Manipulate[
With[{dat=FinancialData[(NotebookTemplateSlot["Ticker", "AMZN", Named, ]),#,(NotebookTemplateSlot["Start", "1 Jan 2014", Named, ])]&/@metric},
DateListPlot[dat,
ImageSize->400,AspectRatio->1/2,Sequence@@(metric/.metricToOpts)
]
],
{{metric,{"Price"},"Property"},{
{"Price"}->"Stock Price"
,{"High","Low"}->"High and Low"
,{"Open","Close"}->"Open and Close"
,{"Return"}->"Daily Return"
,{"CumulativeFractionalChange"}->"Cumulative Fractional Change"
}}
]]