luminaryfi

Alpha & Beta

luminaryfi Aggiornato   
Alpha & Beta Indicators for Portfolio Performance

β = Σ Correlation (RP, RM) * (σP/σM)

α P = E(RP) –

Where,
RP = Portfolio Return (or Investment Return)
RM = Market Return (or Benchmark Index)
RF = Risk-Free Rate


How to use the Indicator

RM = SPX (Default)
The Market Return for the indicator has the options of $SPX, $NDX, or $DJI (S&P 500, Nasdaq 100, Dow 30)

RF = FRED: DTB3
The Risk-Free Rate in the Indicator is set to the 3-Month Treasury Bill: Secondary Market Rate

The Default Timeframe is 1260 or 5-Years (252 Trading Days in One Year)

RP = The symbol you enter
HOWEVER, you can determine your portfolio value by following the following directions below.


Note: I am currently working on an indicator that will allow you to insert the weights of your positions.


Complete Portfolio Analysis Directions



You will first need...
a) spreadsheet application - Google Sheets is Free, but Microsoft Excel will convert ticker symbols to Stocks and Retrieve Data.
b) your current stock tickers, quantity of shares, and last price information

In the spreadsheet,
In the first column list the stock tickers...
AMZN
AAPL
TSLA

In the second column list the quantity of shares you own...
5
10
0.20

In the third column insert the last price
Excel: Three tickers will automatically give you the option to "Convert to Stocks",
after conversion, click once on cell and click the small tab in the upper right-hand of the highlighted cell.
Click the tab and a menu pops up
Find "Price", "Price Extended-Hours", or "Previous Close"...
$3,284.72
$497.48
$2,049.98

Next, multiply the number of shares by the price (Stock Market Value)
Excel: in fourth column type "=(B1*C1)", "=(B2*C2)", "=(B3*C3)"...
= $16,423.60
= $4,974.80
= $410.00

add the three calculated numbers together or click "ΣAutoSum" (Portfolio Market Value)
= $21,808.40

Last, divide the market value of AMZN ($16,423.60) by the Portfolio Market Value ($21,808.40) for each of the stocks.
= 0.7531
= 0.2281
= 0.0188
These values are the weight of the stock in your portfolio.

Go back to TradingView

Enter into the "search box" the following...

AMZN*0.7531 + AAPL*0.2281 + TSLA*0.0188

and click Enter

Now you can use the "Alpha & Beta" Indicator to analyze your entire portfolio!
Note di rilascio:
Update: hline(0.0) and hline(-0.5).
Note di rilascio:
Correction in Beta.
Alpha is now expressed in a percentage.
Note di rilascio:
alpha = jensen's measure (expected portfolio return or 'ex-ante'

added DGS2, DGS5, DGS10, DGS30 risk-free rates
Note di rilascio:
//ticker change for reference
Script open-source

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.

Vuoi usare questo script sui tuoi grafici?