2019 Trending Value Stocks as up November 7th

In the beginning of the year, I had created a real money port using O'Shaughnessy Trending value. I am a big fan of his What Works in Wallstreet book. In August I had liquidated the possion and just replaced it with the current Small Dogs of the Dow. The Small Dogs of the Dow are not as good as just buy the ETF SPY which is my bench mark. But it is good.

Part of the reason why I am doing this post is that I am starting to feel that I could have purchased SPY when I started investing again in late 1999, made more money and had less headaches by just buying SPY and let it ride. The Market is smarter than I am. It is more for my Investment journey since I feel that I need to be more conservative in my choices.

This post compares three choices that I was thinking about January 1, 2019: Dogs of the Dow, Trending Value, SPY. I had bet very wrong with Trending Value.

The Trending Value stocks were generated using AAII Stock Investor Pro.

In [3]:
#Load Libaries
pacman::p_load("quantmod", "tseries", "PerformanceAnalytics")

Trending Value Stocks that I purchase. Barns & Noble is commented out since it was purchased by Elliott June 7th Removing is oversimplification but still gives me a picture of performance.

In [4]:
trendvalueSymbols <-
  c(
    "AFL",
    "AGO",
    "ANAT",
    # "BKS", # Purchased
    "CHA",
    "CHL",
    "CLW",
    "CSIQ",
    "CTB",
    "EIG",
    "ELP",
    "GHC",
    "HRB",
    "KEN",
    "KT",
    "NRP",
    "OFG",
    "PDLI",
    "REGI",
    "SBS",
    "SCVL",
    "SIM",
    "SKM",
    "UAL",
    "VIV"
  )

Dogs of the Dow for 2019

In [5]:
DoDSymbols <-
  c("IBM", "XOM", "VZ", "CVX", "PFE", "KO", "JPM", "PG", "CSCO", "MRK")

Benchmark: SPY

In [6]:
SpyderSymbols <- c("SPY")

Get Stock Data

In [7]:
options("getSymbols.warning4.0"=FALSE)
getSymbols(trendvalueSymbols,
           src = 'yahoo',
           from = '2019-01-08',
           to = '2019-11-08')
getSymbols(SpyderSymbols,
           src = 'yahoo',
           from = '2019-01-08',
           to = '2019-11-08')
getSymbols(DoDSymbols,
           src = 'yahoo',
           from = '2019-01-08',
           to = '2019-11-08')
'getSymbols' currently uses auto.assign=TRUE by default, but will
use auto.assign=FALSE in 0.5-0. You will still be able to use
'loadSymbols' to automatically load data. getOption("getSymbols.env")
and getOption("getSymbols.auto.assign") will still be checked for
alternate defaults.

This message is shown once per session and may be disabled by setting 
options("getSymbols.warning4.0"=FALSE). See ?getSymbols for details.

pausing 1 second between requests for more than 5 symbols
pausing 1 second between requests for more than 5 symbols
pausing 1 second between requests for more than 5 symbols
pausing 1 second between requests for more than 5 symbols
pausing 1 second between requests for more than 5 symbols
pausing 1 second between requests for more than 5 symbols
pausing 1 second between requests for more than 5 symbols
pausing 1 second between requests for more than 5 symbols
pausing 1 second between requests for more than 5 symbols
pausing 1 second between requests for more than 5 symbols
pausing 1 second between requests for more than 5 symbols
pausing 1 second between requests for more than 5 symbols
pausing 1 second between requests for more than 5 symbols
pausing 1 second between requests for more than 5 symbols
pausing 1 second between requests for more than 5 symbols
pausing 1 second between requests for more than 5 symbols
pausing 1 second between requests for more than 5 symbols
pausing 1 second between requests for more than 5 symbols
pausing 1 second between requests for more than 5 symbols
pausing 1 second between requests for more than 5 symbols
  1. 'AFL'
  2. 'AGO'
  3. 'ANAT'
  4. 'CHA'
  5. 'CHL'
  6. 'CLW'
  7. 'CSIQ'
  8. 'CTB'
  9. 'EIG'
  10. 'ELP'
  11. 'GHC'
  12. 'HRB'
  13. 'KEN'
  14. 'KT'
  15. 'NRP'
  16. 'OFG'
  17. 'PDLI'
  18. 'REGI'
  19. 'SBS'
  20. 'SCVL'
  21. 'SIM'
  22. 'SKM'
  23. 'UAL'
  24. 'VIV'
'SPY'
pausing 1 second between requests for more than 5 symbols
pausing 1 second between requests for more than 5 symbols
pausing 1 second between requests for more than 5 symbols
pausing 1 second between requests for more than 5 symbols
pausing 1 second between requests for more than 5 symbols
pausing 1 second between requests for more than 5 symbols
  1. 'IBM'
  2. 'XOM'
  3. 'VZ'
  4. 'CVX'
  5. 'PFE'
  6. 'KO'
  7. 'JPM'
  8. 'PG'
  9. 'CSCO'
  10. 'MRK'

Put data in lists

In [8]:
pricesTV <- list()
pricesSPY <- list()
pricesDoD <- list()

for (i in 1:length(trendvalueSymbols)) {
  pricesTV[[i]] <- Ad(get(trendvalueSymbols[i]))
}
pricesTV <- do.call(cbind, pricesTV)
colnames(pricesTV) <- c(trendvalueSymbols)

for (i in 1:length(SpyderSymbols)) {
  pricesSPY[[i]] <- Ad(get(SpyderSymbols[i]))
}
pricesSPY <- do.call(cbind, pricesSPY)
colnames(pricesSPY) <- c(SpyderSymbols)

for (i in 1:length(DoDSymbols)) {
  pricesDoD[[i]] <- Ad(get(DoDSymbols[i]))
}
pricesDoD <- do.call(cbind, pricesDoD)
colnames(pricesDoD) <- c(DoDSymbols)

Generate Returns and prep for charting

In [9]:
# generate daily returns
returnsTV <- na.omit(ROC(pricesTV, 1, "discrete"))
returnsSPY <- na.omit(ROC(pricesSPY, 1, "discrete"))
returnsDoD <- na.omit(ROC(pricesDoD, 1, "discrete"))

#Prep for charting
portfolio.tv <-
  Return.portfolio(returnsTV, wealth.index = TRUE, verbose = TRUE)
portfolio.spy <-
  Return.portfolio(returnsSPY, wealth.index = TRUE, verbose = TRUE)
portfolio.dod <-
  Return.portfolio(returnsDoD, wealth.index = TRUE, verbose = TRUE)

portfolios.2 <-
  cbind(portfolio.tv$returns,
        portfolio.spy$returns,
        portfolio.dod$returns)
colnames(portfolios.2) <-
  c("Trending Value", "SPYders", "Dogs of Dow")

Chart

In [10]:
chart.CumReturns(
  portfolios.2,
  wealth.index = TRUE,
  legend.loc = "bottomright",
  main = "Growth of $1 investment",
  ylab = "$"
)

Returns

In [11]:
table.AnnualizedReturns(portfolios.2)
Trending Value SPYders Dogs of Dow
Annualized Return 0.0099 0.2643 0.1653
Annualized Std Dev 0.1276 0.1258 0.1158
Annualized Sharpe (Rf=0%) 0.0774 2.1010 1.4270

I don't have time to go into detail this morning. My day job calls. However the difference in returns is glaring. I will let you draw your own conclusions on this.

Jupyter test with R kernel

Just wanted to see if I could do a post with Nikola using an R kernel with Jupyter.

This is the test code from: https://docs.anaconda.com/anaconda/navigator/tutorials/r-lang/

In [1]:
library(dplyr)
iris
Attaching package: 'dplyr'

The following objects are masked from 'package:stats':

    filter, lag

The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union

Sepal.Length Sepal.Width Petal.Length Petal.Width Species
5.1 3.5 1.4 0.2 setosa
4.9 3.0 1.4 0.2 setosa
4.7 3.2 1.3 0.2 setosa
4.6 3.1 1.5 0.2 setosa
5.0 3.6 1.4 0.2 setosa
5.4 3.9 1.7 0.4 setosa
4.6 3.4 1.4 0.3 setosa
5.0 3.4 1.5 0.2 setosa
4.4 2.9 1.4 0.2 setosa
4.9 3.1 1.5 0.1 setosa
5.4 3.7 1.5 0.2 setosa
4.8 3.4 1.6 0.2 setosa
4.8 3.0 1.4 0.1 setosa
4.3 3.0 1.1 0.1 setosa
5.8 4.0 1.2 0.2 setosa
5.7 4.4 1.5 0.4 setosa
5.4 3.9 1.3 0.4 setosa
5.1 3.5 1.4 0.3 setosa
5.7 3.8 1.7 0.3 setosa
5.1 3.8 1.5 0.3 setosa
5.4 3.4 1.7 0.2 setosa
5.1 3.7 1.5 0.4 setosa
4.6 3.6 1.0 0.2 setosa
5.1 3.3 1.7 0.5 setosa
4.8 3.4 1.9 0.2 setosa
5.0 3.0 1.6 0.2 setosa
5.0 3.4 1.6 0.4 setosa
5.2 3.5 1.5 0.2 setosa
5.2 3.4 1.4 0.2 setosa
4.7 3.2 1.6 0.2 setosa
... ... ... ... ...
6.9 3.2 5.7 2.3 virginica
5.6 2.8 4.9 2.0 virginica
7.7 2.8 6.7 2.0 virginica
6.3 2.7 4.9 1.8 virginica
6.7 3.3 5.7 2.1 virginica
7.2 3.2 6.0 1.8 virginica
6.2 2.8 4.8 1.8 virginica
6.1 3.0 4.9 1.8 virginica
6.4 2.8 5.6 2.1 virginica
7.2 3.0 5.8 1.6 virginica
7.4 2.8 6.1 1.9 virginica
7.9 3.8 6.4 2.0 virginica
6.4 2.8 5.6 2.2 virginica
6.3 2.8 5.1 1.5 virginica
6.1 2.6 5.6 1.4 virginica
7.7 3.0 6.1 2.3 virginica
6.3 3.4 5.6 2.4 virginica
6.4 3.1 5.5 1.8 virginica
6.0 3.0 4.8 1.8 virginica
6.9 3.1 5.4 2.1 virginica
6.7 3.1 5.6 2.4 virginica
6.9 3.1 5.1 2.3 virginica
5.8 2.7 5.1 1.9 virginica
6.8 3.2 5.9 2.3 virginica
6.7 3.3 5.7 2.5 virginica
6.7 3.0 5.2 2.3 virginica
6.3 2.5 5.0 1.9 virginica
6.5 3.0 5.2 2.0 virginica
6.2 3.4 5.4 2.3 virginica
5.9 3.0 5.1 1.8 virginica
In [2]:
library(ggplot2)
ggplot(data=iris, aes(x=Sepal.Length, y=Sepal.Width, color=Species)) + geom_point(size=3)

November 2019 pull-up challange

Well, I failed my October 2019 Pullup Challange. Going to try again in November to get up to 10 pullups a day by the end of the month.

November schedule:

Date

# of Pullups

11/1/19

1

11/2/19

1

11/3/19

2

11/4/19

2

11/5/19

2

11/6/19

3

11/7/19

3

11/8/19

3

11/9/19

4

11/10/19

4

11/11/19

4

11/13/19

5

11/14/19

5

11/15/19

6

11/16/19

6

11/17/19

6

11/18/19

7

11/19/19

7

11/20/19

7

11/21/19

8

11/22/19

8

11/23/19

8

11/24/19

9

11/25/19

9

11/26/19

9

11/27/19

10

11/28/19

10

11/29/19

10

Weekly Weight Check In: November 11, 2019

last year at this time, I was in the low 180's. Holiday tradition of gaining weight it. This year I am going to fight the pounds. Plus, I want to be 15% body fat when I do the Sprint triationlon August 2020. My current goal is to be 15% body fat August 3, 2020 or 171 pounds.

On Myfitnesspal, I am trying out checkins on the community board to help me with my weight loss. I might as well put it on my blog.

Weight will be reported using: exponentially smoothed moving average with 10% smoothing. (Hacker's Diet)

Today: 200.3 Last Monday: 201.1 Delta: 0.8

267 days to go or 0.76 pounds per week.

Weight loss over time 200.3200.3200.4200.4200.5200.5200.6200.6200.7200.7200.8200.8200.9200.9201201201.1201.111/411/11Weight loss over time201.112.3658738206025049.74601359440788411/4200.3630.6595648507277497.0466933150607411/11Weight

Just a IPython test

Just testing a anaconda jupyter notebook using examples from

https://blog.quantinsti.com/stock-market-data-analysis-python/

I just want to see how well it works with my Nikola blog

In [1]:
import pandas_datareader
pandas_datareader.__version__
Out[1]:
'0.8.0'
In [2]:
import pandas as pd
from pandas_datareader import data
# Set the start and end date
start_date = '1990-01-01'
end_date = '2019-02-01'
# Set the ticker
ticker = 'AMZN'
# Get the data
data = data.get_data_yahoo(ticker, start_date, end_date)
data.head()
Out[2]:
High Low Open Close Volume Adj Close
Date
1997-05-15 2.500000 1.927083 2.437500 1.958333 72156000.0 1.958333
1997-05-16 1.979167 1.708333 1.968750 1.729167 14700000.0 1.729167
1997-05-19 1.770833 1.625000 1.760417 1.708333 6106800.0 1.708333
1997-05-20 1.750000 1.635417 1.729167 1.635417 5467200.0 1.635417
1997-05-21 1.645833 1.375000 1.635417 1.427083 18853200.0 1.427083
In [3]:
import matplotlib.pyplot as plt
%matplotlib inline
data['Adj Close'].plot()
plt.show()
In [4]:
# Plot the adjusted close price
data['Adj Close'].plot(figsize=(10, 7))
# Define the label for the title of the figure
plt.title("Adjusted Close Price of %s" % ticker, fontsize=16)
# Define the labels for x-axis and y-axis
plt.ylabel('Price', fontsize=14)
plt.xlabel('Year', fontsize=14)
# Plot the grid lines
plt.grid(which="major", color='k', linestyle='-.', linewidth=0.5)
# Show the plot
plt.show()
In [5]:
# Plot the adjusted close price
data['Adj Close'].plot(figsize=(10, 7))
# Define the label for the title of the figure
plt.title("Adjusted Close Price of %s" % ticker, fontsize=16)
# Define the labels for x-axis and y-axis
plt.ylabel('Price', fontsize=14)
plt.xlabel('Year', fontsize=14)
# Plot the grid lines
plt.grid(which="major", color='k', linestyle='-.', linewidth=0.5)
# Show the plot
plt.show()

Ride Santa Barbara 100, a climb too far

Well, I actually tried the RIDESB100 this weekend. There where four routes: 39 miles, 100 km, 100 km with Gibraltar, and the century. I did not finish the ride. At around 43 miles and two miles to the top of Gibraltar, my legs gave out. The last climb before the top was just a killer. The final climb before the top was too much. At two miles away from the top, I just did not want to do the last climb. Also, my bike decided that it would not go into the lowest gear.

What I learned:

  • Have my bike checked out before the ride.

  • Have two water bottles on the bike.

  • Have some hydration tablets to put in the water.

  • Have some sort of concentrated calories that is easy to fit in the jersey pocket.

https://www.instagram.com/p/B3z3ZvFBXep/https://www.instagram.com/p/B3zzhbnB12Q/?utm_source=ig_web_copy_link

Night before SB 100

I am going to ride in the Santa Barbara 100. Actually going for the 100 mile ride. Part of me feels like it is hubris on my side to try it as my first ride of this sort. The 100 km or 39 mile right would have been a better choice.

Well, no guts no glory.

October 2019 Pullup Challange

Goal is to get back up to 10 pullups a day. Most challanges start with one and increase by one every day. I am going to try to do it as every third day. Goal is to get to 10 pullups.

Current schedule:

Date

# of Pullups

1-Oct

1

2-Oct

1

3-Oct

2

4-Oct

2

5-Oct

2

6-Oct

3

7-Oct

3

8-Oct

3

9-Oct

4

10-Oct

4

11-Oct

4

12-Oct

5

13-Oct

5

14-Oct

5

15-Oct

6

16-Oct

6

17-Oct

6

18-Oct

7

19-Oct

7

20-Oct

7

21-Oct

8

22-Oct

8

23-Oct

8

24-Oct

9

25-Oct

9

26-Oct

9

27-Oct

10

28-Oct

10

29-Oct

10

30-Oct

11

31-Oct

11