파이썬으로 RSI값 구하기


파이썬으로 RSI값 구하기

from pykrx import stock import datetime import numpy as np def RSI(input, period, code): # input : RSI 변수, period = 봉갯수, code = '종목코드' period = max(200,period) end = datetime.datetime.now() start = end - datetime.timedelta(days=period) price = stock.get_market_ohlcv_by_date(fromdate=start, todate=end, ticker=code) del price['거래량'] price['Up_amt'] = np.where(price['종가'] - price['종가'].shift(1) > 0, price['종가'] - price['종가'].shift(1), 0) price['Down_amt'] = np.where(price['종가'] - price['종가'].shift(...


#RSI #시스템트레이딩 #주식 #코스닥 #코스피

원문링크 : 파이썬으로 RSI값 구하기