Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# Let's Start
#Import the necesary libraries
# To get the closing prices data
from pandas_datareader import data as pdr
import yfinance as yf
yf.pdr_override()
# Plotting data
import matplotlib.pyplot as plt
import seaborn
#data Manipulation
import numpy as np
import pandas as pd
# Define a function to calculate the strategy performance on a stock
def strategy_performance(stock_ticker):
stock = pdr.get_data_yahoo(stock_ticker, start = "2009-01-01", end = "2017-11-10")
# Compute 55 days breakout and mean
# 5 days high