AI Stock Picking Dashboard via mwShiny in Docker behind Apache ReverseProxy

In this post I demonstrate [the performance of] a multi-window interactive graphical dashboard, which visualizes the stock-picking signals from an ensemble of deep neural networks.
Further I describe the online deployment of this dashboard by means of Docker and Apache ReverseProxy.
Everybody, who invests quantitatively and significantly contributed to the engaged software: in partucular R, [mw]Shiny, LAMP-stack, Docker (and of course TF/keras) are encouraged to claim their free access to this dashboard (others are also encouraged to request a paid subscription :))
. Continue reading "AI Stock Picking Dashboard via mwShiny in Docker behind Apache ReverseProxy"

Affordable Hardware for Stockpicking AI – BeerWulf’s eBay Adventure

In my previous post I reported howto build and install TensorFlow and horovod from sources and howto setup a BeerWulf (BeoWulf) cluster. Building this BeerWulf cluster is though a good exercise to make a (resilient) system of a commodity hardware, however, it is not the most efficient way for a practical purpose (in my case: for creating an AI model, which helps me to pick up stocks). In this post I consider the hardware alternatives in the sense of making them both as efficient and as cheap as possible. Continue reading "Affordable Hardware for Stockpicking AI – BeerWulf’s eBay Adventure"

Building TensorFlow 2.5 (CPU only) and Horovod from source in Ubuntu 20.04.2 LTS

Short summary:

sudo swapoff /swapfile
sudo dd if=/dev/zero of=/swapfile bs=1M count=65536 oflag=append conv=notrunc
sudo mkswap /swapfile
sudo swapon /swapfile

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
sudo apt update
sudo apt install python3-dev python3-pip
sudo apt install python3-testresources
pip install -U --user pip numpy==1.19.5 wheel
pip install -U --user keras_preprocessing --no-deps
sudo apt install git
git clone https://github.com/tensorflow/tensorflow.git
cd tensorflow
git checkout r2.5
sudo apt install npm
sudo npm install -g @bazel/bazelisk
./configure

bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package
./bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
pip install /tmp/tensorflow_pkg/tensorflow-2.5.0-cp38-cp38-linux_x86_64.whl

sudo apt-get install openssh-server
sudo systemctl enable ssh
sudo systemctl start ssh
ssh-keygen
ssh-copy-id vasily@SERVER2
ssh SERVER2
ssh-keygen
ssh-copy-id vasily@SERVER1

sudo snap install cmake --classic
sudo apt install openmpi-bin
mpirun -H SERVER1:1,SERVER2:1 hostname

git clone --recursive https://github.com/uber/horovod.git
cd horovod
python setup.py clean
python setup.py bdist_wheel
HOROVOD_WITH_TENSORFLOW=1 pip install ./dist/horovod-0.22.1-cp38-cp38-linux_x86_64.whl[tensorflow,keras]
mpirun -H SERVER1:3,SERVER2:3 python3 /home/vasily/horovod/examples/tensorflow2/tensorflow2_keras_mnist.py
Continue reading "Building TensorFlow 2.5 (CPU only) and Horovod from source in Ubuntu 20.04.2 LTS"

Howto Install Tensorflow-GPU with Keras in R – A manual that worked on 2021.02.20 (and likely will work in future)

A brief instruction:
0. Update your Nvidia graphic card driver (just driver; you need NOT install/update CUDA but make sure that your card has cuda compute capability >= 3.5)
1. install Anaconda (release Anaconda3-2020.11 from anaconda.org)
2. open anaconda prompt and run
>conda create -n tfgpu210p37 python==3.7
>conda activate tfgpu210p37
>conda install cudatoolkit=10.1 cudnn=7.6 -c=conda-forge
>conda install -c anaconda tensorflow-gpu
3. in R run
>install.packages("keras")
>reticulate::use_condaenv("tfgpu210p37", required = TRUE)
>library(keras)
4. If you wanna understand what is going on under the hood, read further
Continue reading "Howto Install Tensorflow-GPU with Keras in R – A manual that worked on 2021.02.20 (and likely will work in future)"

Häusle oder Aktien? – Die Antwort gibt es aber man muss immer adhoc berechnen

Am häufigsten kommen zwei Empfehlungsarten von "Experten" vor: entweder in die Aktien zu investieren weil sie eine höhere erwartete Rendite bringen oder die Immobilien zu kaufen weil die stabiler sind.
Beide Aussagen sind lediglich ein kleiner Teil der komplizierten Wahrheit. In diesem Post zeigen wir anhand eines Beispiels, wie man - mittels Zahlen und Berechnungen - eine mehr oder weniger vollständige Antwort für seinen persönlichen Fall bekommen kann.
Sehr hilfreich dafür ist das kostenlose Toolset von letYourMoneyGrow.com
Continue reading "Häusle oder Aktien? – Die Antwort gibt es aber man muss immer adhoc berechnen"

Interbreeding R and Python to Give Birth to an Optimal German Mortgage

In many countries a mortgage shall be completely redeemed to the end of its duration and may be refinanced anytime. In USA one additionally can foreclose his mortgage by mailing his house-keys to a bank. In Germany is different.
First of all, one may completely refinance a mortgage only after 10 years (otherwise one have to pay Vorfälligkeitsentschädigung - a compensation to a bank for missed interest). But taking a long-term mortgage (20 or 30 years) implies a higher mortgage rate, thus it is not uncommon to take several consequent 10- (or sometimes even 5-) year mortgages. In order to optimize mortgage costs / rate change risk relation one can take several submortgages with different durations. Last but not least there is no requirement to amortize a mortgage completely: normally one refinances the residual debt (Restschuld) with a follow-up mortgage (Anschlussfinanzierung).
In this post we discuss the challenges of mortgage optimization and show how two popular programming languages - R and Python - can help us together
Continue reading "Interbreeding R and Python to Give Birth to an Optimal German Mortgage"

Verse über COVID-19 Impfstoff Rennen – das Rezept von Baba Jaga im Gedicht

Immer wieder wird es berichtet, Impfstoff gegen Coronavirus sei da. Damit kann man gut News traden aber man muss verstehen, dass wir ein mehr oder weniger geprüftes Mittel im besten Fall erst in ein paar Jahren bekommen werden. Continue reading "Verse über COVID-19 Impfstoff Rennen – das Rezept von Baba Jaga im Gedicht"

The Epic Rise and Fall of Wirecard AG – The Money Management View

Wirecard is a German company, which provides e-payment solutions. It grew very rapidly but the fall was even quicker. This case perfectly demonstrates the advantages of diversification and money management. Continue reading "The Epic Rise and Fall of Wirecard AG – The Money Management View"

Анализ одной фьючерсной стратегии – как следует действовать осторожному инвестору

В сфере управления капиталом часто возникает противоречие - трейдеру нет резона раскрывать детали стратегии, а инвестору рисковано инвестировать в то, что он не понимает. В случае работы через Interactive Brokers сформировался негласный компромис - от трейдера ожидается, что он (по крайней мере) предоставит стандартный детальный отчет IB. На примере стратегии от Юрия Чередниченко мы рассматриваем, что можно (и чего нельзя) почерпнуть из отчетности IB.
Практика показывает, что типичный частный инвестор практически не способен воспринимать результаты статистического анализа, не говоря уж о том чтоб самому провести такой анализ. Поэтому в этот раз мы намеренно обходимся без математики, аппелируя лишь к графикам и здравому смыслу
. Continue reading "Анализ одной фьючерсной стратегии – как следует действовать осторожному инвестору"

4. Münchener Tischgespräch von DSW – drei interessante Präsentationen

Auf 4. Münchener Tischgespräch, organisiert am 05.12.2019 vom Deutschen Schutzverein für Wertpapierbesitz e.V. (DSW), hatte ich die Gelegenheit, drei interessante Vorträge von Fraport (ETR:FRA), Biofrontera(NASD:BFRA) und Deutscher Post(ETR:DPW) zu hören. Obwohl ich der quantitative Investor bin, also schaue ich eher auf die Zahlen als auf die Stories, fand ich die Information sehr interessant. Darüber hinaus war es keine Massenveranstaltung, sondern wirklich ein Tischgespräch im engeren Kreis.
Prof. Dr. Roland Klose - Director Investment Education, DSW Continue reading "4. Münchener Tischgespräch von DSW – drei interessante Präsentationen"