Other Graphs & Useful Analytics
READ THIS FIRST
Type in a character string similar to one of the EXAMPLES below and click "Plot".
You can also click any example shown in blue to run it directly.
(MANY GRAPHS AND ANALYSES FOR EQUITIES, ETFs, FUNDS, TREASURIES, AND PORTFOLIOS)
Disclaimer: All results are based on approximate historical data and are provided for informational purposes only. No guarantee is made regarding the accuracy, completeness, or applicability of the results. Historical data and calculated results may contain errors. Use at your own risk. This is not financial advice.
Most features on this page are accessible without logging in during beta testing.
EXAMPLES
Return Bar Charts:
dret / wret / mret / qret / 6ret / yret,ticker1(-ticker2),yrs — Creates bar charts of daily, weekly, monthly, quarterly, 6-month, or yearly returns.
Examples:
mret,TSLA,0.75 — Shows monthly returns for TSLA over the past 0.75 years.
yret,SPY,26 — Shows annual returns for SPY over 26 years.
yret,SPY-QQQ,20 — Compares annual returns for SPY and QQQ over 20 years.
2yret,SPY,20 — Shows 2-year return bars over a 20-year period.
An integer prefix such as 2yret works only with yret.
Add ,exc to save the results as a CSV file.
Example:
yret,SPY,26,exc
Adding _CPI to a ticker adjusts returns for inflation.
Examples: SPY_CPI, 10 Yr_CPI
Adding a % at the end causes the result plotted to be actual change(not % change)
Example:
yret,usdebt,10,%
adding a # at the end causes the result plotted to be actual value at the end of each period.
Example:
yret,usdebt,10,#
For treasuries, % and # will show result in yields , else as price returns.
yret,10 Yr,10 shows price returns , yret,10 Yr,10,% shows yield changes , yret,10 Yr,10,# shows yields at end of each period.
Inflation-Adjusted Returns:
yrs,ticker1,...,tickerN,INF — Plots inflation-adjusted returns for the selected tickers over the specified period.
3,SPY,AAPL,INF — Shows inflation-adjusted returns for SPY and AAPL over 3 years.
Return Heat Maps:
hmp,totyrs,yrinterval,ncolors,ticker1,ticker2,... — Creates a return heat map over totyrs years, using the specified year/month/week interval and number of colors.
Examples:
hmp,20,5,7,SPY,QQQ,GLD — 20 years of returns using 5-year intervals and 7 colors.
hmp,2,3m,7,SPY,QQQ,GLD — 2 years of returns using 3-month intervals.
hmp,1,3w,7,SPY,QQQ,GLD — 1 year of returns using 3-week intervals.
Fund Allocations:
tbl,ticker1,ticker2,... — Creates a table of asset allocations for Funds or ETFs.
tbl,SPY,QQQ,FPURX
Add ,exc to save the results as a CSV file.
tbl,SPY,QQQ,FPURX,exc
Trend Analysis:
trnd,ticker(s),yrs,fittype — Plots a trendline for one or more tickers.
fittype is optional and defaults to 1 (linear).
trnd,QQQ,3 — Shows a 3-year linear trendline for QQQ.
trnd,QQQ,3,2 — Shows a second-order fitted trend for QQQ.
trnd,SPY,QQQ,3,2 — Shows second-order fitted trends for both SPY and QQQ.
trnd2,ticker1,ticker2,.../yrs1,yrs2,... — Plots linear trendlines for one or more tickers over multiple date ranges.
trnd2,QQQ/2000-2007,2008-2026 — Shows separate linear trends for QQQ during 2000-2007 and 2008-2026.
trnd2,USDEBT,USWEALTH/1988-2007,2008-2028 — Shows trends for USDEBT and USWEALTH over the two specified periods.
Drawdowns:
drw,yrs,ticker — Creates a bar chart showing the maximum drawdown for each year.
drw,50,GSPC — Shows maximum annual drawdowns for the S&P 500 Index over 50 years.
dwr,yrs,ticker — Plots continuous global drawdowns measured from the previous global peak.
dwr,10,sp5IGBIT — Shows global drawdowns for the S&P 500 Investment Grade Bond Index over 10 years.
dwx,yrs,ticker — Plots continuous local drawdowns measured from the most recent local peak.
dwx,10,sp5IGBIT — Shows local drawdowns for the S&P 500 Investment Grade Bond Index over 10 years.
Return Tables:
fnds,yrs,tickers — Shows a table of returns for the specified tickers over the selected period.
fnds,10,x_sample,xle,xlf — Shows returns over 10 years for the tickers represented by X_SAMPLE, together with XLE and XLF.
Moving Average:
avg,ticker,yrs,days — Plots an n-day moving average together with the actual values over the specified period.
avg,BRKB,7,200 — Shows the 200-day moving average and actual values for BRKB over 7 years.
Support and Resistance:
supp,ticker,yrs — Plots estimated support and resistance together with actual values over the specified period.
supp,BRKB,7
Optional support/resistance levels may also be specified:
supp,BRKB,7,20,80
Rolling Risk and Return Measures:
vol,yrs,ndays,ticker1,ticker2,... — Compares n-day rolling volatility for the selected tickers.
vol,12,252,BTCUSD,TSLA — Compares 252-day rolling volatility for BTCUSD and TSLA over 12 years.
shrp,yrs,ndays,ticker1,ticker2,... — Compares n-day rolling Sharpe Ratios for the selected tickers.
shrp,12,252,BTCUSD,TSLA
srtn,yrs,ndays,ticker1,ticker2,... — Compares n-day rolling Sortino Ratios for the selected tickers.
srtn,12,252,BTCUSD,TSLA
Winning and Losing Streaks:
max,yrs,ticker,n — Shows the top n winning or losing streaks over the specified period.
max,25,GSPC,10 — Shows the top 10 winning or losing streaks for GSPC over 25 years.
Largest Multi-Day Gains and Losses:
nrt,ticker,yrs,m,n,exc — Lists the top n m-day cumulative gains and losses over the specified period and saves the results as CSV.
nrt,SPY,2,5,10,exc — Shows the top 10 5-day cumulative gains and losses for SPY over 2 years.
nrt,ticker,yrs,m,n,opt — Displays the top n m-day cumulative gains or losses as a table or graph.
opt=0 — Table
opt=1 — Largest gains
opt=2 — Largest losses
opt=3 — Both gains and losses
nrt,SPY,2,5,6,3 — Graphs the top 6 5-day gains and losses for SPY over 2 years.
Return and Risk Metrics:
rtn(e/s/f),yrs,exc — Calculates Sharpe, Sortino, and other return/risk metrics for ETFs, Stocks, or Funds over the specified period.
Maximum period: 2 years.
rtne — ETFs
rtns — Stocks
rtnf — Funds
rtne,1,exc — Calculates metrics for ETFs using a 1-year lookback and saves the results as CSV.
This analysis may take some time to process.
Recession Analysis:
recession,25,2 — Searches for periods with 2 consecutive quarters of GDP declines during the past 25 years.
recession,25,2,1 — Uses S&P 500 drawdowns.
recession,25,2,10 — Skips the yield-spread check.
Portfolio Growth:
por2,yrs,ticker+weight,... — Plots the historical growth of a portfolio.
por2,2,QQQ+60,BND+40+2 — Plots a 60% QQQ / 40% BND portfolio over 2 years, with an additional 2% dividend applied to BND.
A portfolio may contain any number of Stocks, ETFs, or Funds. Portfolio weights should total 100%.
A comparison ticker may be added at the end.
por2,2,QQQ+60,BND+40+2,SPY — Compares the 60/40 portfolio with SPY.
Generic Query - Developers Only:
gen — Generic query facility intended for development and testing.
Examples:
gen,1,prem10y,10yprem
gen,1,usindex,close,GSPC
gen,5,cpiaucsl,cpiaucsl,tickers,,exc
Other Ways to Specify the Time Period:
The following formats work with most, but not all, features on this page.
Year:
2022 — Uses data from 1/1/2022 through 12/31/2022.
Year Range:
2021-2023 or 2021-23 — Uses data from 1/1/2021 through 12/31/2023.
YTD:
Uses data from the beginning of the current year through today.
Years:
2 — Starts 2 years ago.
2.3 — Starts 2.3 years ago.
3.5-6 — Uses data from 6 years ago through 3.5 years ago.
Months:
3M — Starts 3 months ago.
3M-7M — Uses data from 7 months ago through 3 months ago.
Date Range:
20210912 — Uses data from 9/12/2021 through today.
20210912-20231231 — Uses data from 9/12/2021 through 12/31/2023.