<% if (plugins.stock) { %>

Stock prices <%= plugins.stock.symbol ? `for ${plugins.stock.symbol}` : "" %>

<% if (plugins.stock.error) { %>
<%= plugins.stock.error.message %>
<% } else { %>
<%= plugins.stock.company %>
Valued at <%= plugins.stock.price.toFixed(2) %> <%= plugins.stock.currency %>
<%= {"1d":"Today", "5d":"Last five days", "1mo":"Last month", "3mo":"Last trimester", "6mo":"Last semester", "1y":"Last year", "2y":"Last two years", "5y":"Last five years", "10y":"Last ten years", ytd:"Year to date", max:"All-time"}[plugins.stock.duration] %>
<% if (plugins.stock.delta > 0) { %> <% } else { %> <% } %> <%= f(plugins.stock.delta, {sign:true, fixed:2}) %> <%= plugins.stock.currency %> (<%= f(100*plugins.stock.delta/plugins.stock.price, {sign:true, fixed:2}) %>%)
<%- plugins.stock.chart %>
<% } %>
<% } %>