株のシステムトレードをしよう - 1から始める株自動取引システムの作り方

株式をコンピュータに売買させる仕組みを少しずつ作っていきます。できあがってから公開ではなく、書いたら途中でも記事として即掲載して、後から固定ページにして体裁を整える方式で進めていきます。

kabu STATION APIを使ったリアルタイムトレード用のクラスを作る その7

下記の設定で、良い感じにダークモードの設定もでき、やっと取りかかれるようになった。

f:id:dogwood008:20210227233603p:plain
Jupyter Notebook

# Dockerfile
FROM jupyter/scipy-notebook:42f4c82a07ff
LABEL maintainer="dogwood008"
ARG homedir=/home/jovyan
ARG workdir=${homedir}/work
ARG btrepodir=/opt/backtrader

ENV TZ=Asia/Tokyo
ENV JUPYTER_CONFIG_DIR=$homedir/.jupyter

USER jovyan

WORKDIR $workdir
COPY Pipfile $workdir
COPY Pipfile.lock $workdir

RUN pip install --upgrade pip && \
    pip install pipenv && \
    pipenv install --deploy --ignore-pipfile --python=$(conda run which python) --site-packages && \
    mkdir -p $(jupyter --data-dir)/nbextensions && \
    cd $(jupyter --data-dir)/nbextensions && \
    git clone https://github.com/lambdalisue/jupyter-vim-binding vim_binding

RUN pipenv run jupyter contrib nbextension install --user && \
    pipenv run jupyter nbextension enable vim_binding/vim_binding

RUN pipenv run jt -t monokai -f fira -fs 13 -nf ptsans -nfs 11 -N -kl -cursw 5 -cursc r -cellw 95% -T


# Run Jupyter
EXPOSE 8888
CMD ["pipenv", "run", "start-notebook.sh"]
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
backtrader = {editable = true, ref = "master", git = "https://github.com/mementum/backtrader.git"}
matplotlib = "*"
backtrader-plotting = "*"
python-kabusapi = {ref = "feature/add_setup.py", git = "https://github.com/dogwood008/python-kabusapi.git"}
jupyter_contrib_nbextensions = "*"
jupyter_nbextensions_configurator = "*"
autopep8 = "*"
jupyterlab-legos-ui = "*"
jupyterthemes = "*"

[dev-packages]
jupyter = "*"
jupyterthemes = "*"

[requires]
python_version = "3.8"

(C) 2020 dogwood008 禁無断転載 不許複製 Reprinting, reproducing are prohibited.