This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(quantmod) | |
require(ggplot2) | |
require(ggthemes) | |
# The starting index in the elections dates and president's arrays | |
# start.index = 7 | |
start.index = 6 | |
# sp = getSymbols("^GSPC", from="1900-01-01", auto.assign=F) | |
sp = as.xts(read.csv.zoo('dji.csv', format='%Y%m%d', header=F, sep=",")[,1:4]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python == 3.6.2 | |
# bs4 == 4.6.0 | |
# The current version of BeautifulSoup's soup.prettify() function only allows for | |
# an indentation level = to 1 space. This is a simple, reliable way to allow for the use | |
# of any indentation level you wish. | |
import requests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python == 3.6.2 | |
# bs4 == 4.6.0 | |
# The current version of BeautifulSoup's soup.prettify() function only allows for | |
# an indentation level = to 1 space. This is a simple, reliable way to allow for the use | |
# of any indentation level you wish. | |
import requests |