This file contains 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
def get_stock_price(ticker): | |
data = yf.download(ticker, start="2021-01-01") | |
return data | |
def add_EMA(price, day): | |
return price.ewm(span=day).mean() | |
def add_STOCH(close, low, high, period, k, d=0): | |
STOCH_K = ((close - low.rolling(window=period).min()) / (high.rolling(window=period).max() - low.rolling(window=period).min())) * 100 | |
STOCH_K = STOCH_K.rolling(window=k).mean() |
This file contains 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
function getJapReading(word) { | |
var url = "http://jisho.org/api/v1/search/words?keyword=" + word; | |
var response = UrlFetchApp.fetch(url, {'muteHttpExceptions': true}); | |
var json = JSON.parse(response.getContentText()); | |
japReading = json.data[0].japanese[0].reading; | |
return japReading; | |
} | |
function getEnglishDef(word) { | |
var url = "http://jisho.org/api/v1/search/words?keyword=" + word; |
This file contains 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
#import required modules | |
from bs4 import BeautifulSoup | |
import ast | |
import pandas as pd | |
import re | |
import requests | |
from datetime import datetime | |
def get_stock_price(ticker): | |
# pass a ticker name to i3investor website url |
NewerOlder