지표계산을 위한 UDF import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib.dates as mpl_dates x축형식 지정을 위한 UDF def xaxis_form(n=20, format='%y/%m/%d', ax=False): locator = mpl_dates.DayLocator(interval=n) form = mpl_dates.DateFormatter(format) if ax==False: ax=plt.gca() ax.xaxis.set_major_locator(locator) ax.set_xticklabels([]) else: ax=plt.gca() ax.xaxis.set_major_locator(locator) ax.xaxis.set_major_formatter(form) plt.xticks(rotation=45) A ADL def calculate_adl(df, short_period=3, long_period=10): high = df['High'] low = df['Low'] close = df['Close'] volume = df['Volume'] result=pd.DataFrame() result["MFM"] = ((close - low) - (high - close)) / (high - low) result["MFV"] = result["MFM"] * volume result["ADL"] = result["MFV"].cumsum() short_ema=result["ADL"].ewm...
python 언어를 적용하여 통계(statistics)와 미적분(Calculus), 선형대수학(Linear Algebra)을 소개합니다. 이 과정에서 빅데이터를 다루기 위해 pytorch를 적용합니다.