AI is my favorite domain as a professional Researcher. What I am doing is Reinforcement Learning,Autonomous Driving,Deep Learning,Time series Analysis, SLAM and robotics. Also Economic Analysis including AI,AI business decision
defATR(df,period):'''
Method A: Current High less the current Low
'''df['H-L']=abs(df['High']-df['Low'])df['H-PC']=abs(df['High']-df['Close'].shift(1))df['L-PC']=abs(df['Low']-df['Close'].shift(1))TR=df[['H-L','H-PC','L-PC']].max(axis=1)returnTR.to_frame()
OHLC plot
%matplotlibnotebookimportpandasaspdimportnumpyasnpimportmatplotlib.pyplotaspltimportmatplotlib.tickerasmtickerfrommpl_financeimportcandlestick_ohlcimportmatplotlib.datesasmdatesimportdatetimeasdtdf=pd.read_pickle('../histdata/KQ11from2001')# 055550_신한지주 088350_한화생명
#Reset the index to remove Date column from index
df_ohlc=df.reset_index()df_ohlc=df_ohlc[["Date","Open","High",'Low',"Close"]]df_ohlc=df_ohlc[-100:]#Naming columns
df_ohlc.columns=["Date","Open","High",'Low',"Close"]#Converting dates column to float values
df_ohlc['Date']=df_ohlc['Date'].map(mdates.date2num)#Making plot
fig=plt.figure()ax1=plt.subplot2grid((6,1),(0,0),rowspan=6,colspan=1)#Converts raw mdate numbers to dates
ax1.xaxis_date()plt.xlabel("Date")# print(df_ohlc)
#Making candlestick plot
candlestick_ohlc(ax1,df_ohlc.values,width=1,colorup='r',colordown='b',alpha=0.75)plt.ylabel("Price")plt.legend()plt.show()
```python
from keras.datasets import mnist
from keras.utils import to_categorical
from keras.models import Sequential
from keras.layers import Conv2D
from ke...