Publications by Sondre Asheim

Apply10

08.11.2023

# Load packages # Core library(tidyverse) library(tidyquant) Goal Calculate and visualize your portfolio’s beta. Choose your stocks and the baseline market. from 2012-12-31 to present 1 Import stock prices # Choose stocks symbols <- c("AAPL", "ROKU", "CL=F") # Using tq_get() ---- prices <- tq_get(x = symbols, get ...

1207 sym R (2736 sym/11 pcs) 1 img

CodeAlong10

05.11.2023

# Load packages # Core library(tidyverse) library(tidyquant) Goal Collect individual returns into a portfolio by assigning a weight to each stock five stocks: “SPY”, “EFA”, “IJS”, “EEM”, “AGG” from 2012-12-31 to 2017-12-31 1 Import stock prices # Choose stocks symbols <- c("SPY", "EFA", "IJS", "EEM", "AGG") # Using tq...

472 sym R (3376 sym/12 pcs) 2 img

RevisedCode8

30.10.2023

# Load packages # Core library(tidyverse) library(tidyquant) Goal Visualize and examine changes in the underlying trend in the downside risk of your portfolio in terms of kurtosis. Choose your stocks. from 2012-12-31 to present 1 Import stock prices # Choose stocks symbols <- c("AAPL", "ROKU", "CL=F") # Using tq_get() ---- prices <- tq_...

1162 sym R (2730 sym/9 pcs) 1 img

Apply9

30.10.2023

# Load packages # Core library(tidyverse) library(tidyquant) Goal Visualize and examine changes in the underlying trend in the performance of your portfolio in terms of Sharpe Ratio. Choose your stocks. from 2012-12-31 to present 1 Import stock prices # Choose stocks symbols <- c("AAPL", "ROKU", "CL=F") # Using tq_get() ---- prices <- t...

1235 sym R (3318 sym/11 pcs) 1 img

CodeAlong9

29.10.2023

# Load packages # Core library(tidyverse) library(tidyquant) Goal Collect individual returns into a portfolio by assigning a weight to each stock five stocks: “SPY”, “EFA”, “IJS”, “EEM”, “AGG” from 2012-12-31 to 2017-12-31 1 Import stock prices # Choose stocks symbols <- c("SPY", "EFA", "IJS", "EEM", "AGG") # Using tq...

446 sym R (4725 sym/15 pcs) 3 img

Apply8

29.10.2023

# Load packages # Core library(tidyverse) library(tidyquant) Goal Visualize and examine changes in the underlying trend in the downside risk of your portfolio in terms of kurtosis. Choose your stocks. from 2012-12-31 to present 1 Import stock prices # Choose stocks symbols <- c("AAPL", "ROKU", "CL=F") # Using tq_get() ---- prices <- tq_...

1049 sym R (2730 sym/9 pcs) 1 img

CodeAlong8

22.10.2023

# Load packages # Core library(tidyverse) library(tidyquant) Goal Measure portfolio risk using skewness. Skewness is the extent to which returns are asymmetric around the mean. It is important because a positively skewed distribution means large positive returns are more likely while a negatively skewed distribution implies large negative ...

647 sym R (3635 sym/11 pcs) 3 img

Apply7

19.10.2023

# Load packages # Core library(tidyverse) library(tidyquant) Goal Visualize and compare skewness of your portfolio and its assets. Choose your stocks. (AAPL, ROKU, CL=F) from 2012-12-31 to 2017-12-31 1 Import stock prices # Choose stocks symbols <- c("AAPL", "ROKU", "CL=F") # Using tq_get() ---- prices <- tq_get(x = symbols, ...

925 sym R (2516 sym/11 pcs) 1 img

CodeAlong7

16.10.2023

# Load packages # Core library(tidyverse) library(tidyquant) Goal Measure portfolio risk using skewness. Skewness is the extent to which returns are asymmetric around the mean. It is important because a positively skewed distribution means large positive returns are more likely while a negatively skewed distribution implies large negative ...

647 sym R (4197 sym/13 pcs) 3 img

Apply6

10.10.2023

# Load packages # Core library(tidyverse) library(tidyquant) Goal Visualize expected returns and risk to make it easier to compare the performance of multiple assets and portfolios. Choose your stocks. from 2012-12-31 to 2017-12-31 1 Import stock prices # Choose stocks symbols <- c("ROKU", "AAPL", "CL=F") # Using tq_get() ---- prices <-...

1660 sym R (4076 sym/17 pcs) 2 img