QuantLib Python – debugging C++ side with Visual Studio and PyCharm – a dirty way

QuantLib Python - a port of C++ library to Python via SWIG - provides a lot of advantages for a practical usage. In particular, it gives a great flexibility due to interactive python console and allows a seamless integration with the AI libraries like Keras and Tensorflow. However, it seems to be challenging to debug the C++ code, called from Python side. So far we found out a quick but dirty solution. Continue reading "QuantLib Python – debugging C++ side with Visual Studio and PyCharm – a dirty way"

Visualizing the Fundamental Data on 400 Stocks over 80 Quarters

It is relatively easy to visualize the aggregated statistics over many periods, e.g. by means of the boxplot series. However, it may be challenging if you want to have a simultaneous look at every element for all time periods. We propose to do it by means of an animated 3D-scatterplot. Continue reading "Visualizing the Fundamental Data on 400 Stocks over 80 Quarters"

Classifying Time Series with Keras in R : A Step-by-Step Example

We test different kinds of neural network (vanilla feedforward, convolutional-1D and LSTM) to distinguish samples, which are generated from two different time series models. Contrary to a (naive) expectation, conv1D does much better job than the LSTM. Continue reading "Classifying Time Series with Keras in R : A Step-by-Step Example"

R code to detect support and resistance levels

Support and resistance levels are quite popular among traders. Although they are implemented in many apps and services, an open source implementation of the algorithm is hardly available. We try to close the gap.
Continue reading "R code to detect support and resistance levels"

QuantLib Python – Twisting a Snake to fit a Yieldcurve

I explain how to install QuantLib Python from sources and discuss how to fit a yield curve: PiecewiseLogCubicDiscount and NelsonSiegel.
Continue reading "QuantLib Python – Twisting a Snake to fit a Yieldcurve"

Visualizing the Data on 6356 American Stocks – with R source code

By current artificial intelligence, big data and robo-advisory hype many people believe that computers can do everything for you. I am pretty skeptical about it. Never denying (and actively engaging by myself) a computer-aided trading and investment I always claim "man and machine" rather than "man vs. machine". In this post I show you how to summarize and visualize the data from Alpha Vantage for 6356 American stocks. Continue reading "Visualizing the Data on 6356 American Stocks – with R source code"

Calculate CAGR of Your Savings Plan | Free Online Calculator


This tool allows you to calculate the compound annual growth rate (CAGR) of your 401(k) savings plan. All you need is to know the size and dates of your installments and the market value of your savings plan on the reference date. Irregular (aperiodic) installment are supported but the (partial) withdrawals are not since it is, in general, impossible to uniquely define the CAGR for a cashflow with several pay-offs Continue reading "Calculate CAGR of Your Savings Plan | Free Online Calculator"

QuantLibXL – A Curvy Way to fit a Yield Curve

QuantLib is a magnificent library for quantitative finance. But it is also like a gun, heavy enough to shoot your own foot. You might expect that QuantLibXL (a plug-in that provides a subset of QuantLib functionality in Excel) makes your life easier. Unfortunately, it hardly does, as we show in this case study. For an easy and straight way you should better have a look at Deriscope. Continue reading "QuantLibXL – A Curvy Way to fit a Yield Curve"

Beyond Black Scholes: European Options without Dividends

Options are the simplest non-trivial financial derivatives around. They are part of the curriculum of every university course on Finance for a good reason: They are everywhere! They are traded on regulated exchanges around the world, change hands over the counter between … consenting adults, enhance or "infect" all sorts of contracts as "embedded options", constitute the main ingredient of insurance policies. In their pure form, their annual volume on U.S. Equity Option exchanges alone exceeds 4 billion contracts!
This is the first of a series of articles that will show you how to compute the fair value of options within Excel without using expensive third party software.
Continue reading "Beyond Black Scholes: European Options without Dividends"

Using a Forex Trading Simulator in Excel

In my last post I showed you how to use the Deriscope Stock Trading Simulator Excel spreadsheet to place simulated BUY and SELL market orders on US stocks traded on IEX (the Investors Exchange). In this post I will guide you through another Excel spreadsheet called DsTradingSimulatorFX.xlsm that you can also download for free. This new spreadsheet allows you to place simulated BUY and SELL orders on specific currencies based on real time bid/offer quotes supplied by the TrueFX live feeds provider. As usually, the only prerequisite is that you have previously installed the free Deriscope Excel Add-In – downloaded from the same site as above - that equips your Excel session with a wizard that allows you to fetch live data from various providers and also perform various financial calculations. Continue reading "Using a Forex Trading Simulator in Excel"