History (hst) files to MongoDB using Python

As I mentioned previously, due to performance issues I've switched from MySQL to MongoDB. Now instead of running script for 4 days it seems read half gigabyte of hst files in one night with one instance. Other pro is that MongoDB in comparison doesn't overload disk...

Monte Carlo as SPX price forecaster using Python

Let's make our latest Student's T-distribution Monte Carlo as price path forecaster. First we'll generate enough of random paths based on standard distribution with specified drift and volatility and then take their average as the forecasted price. As I want to...

Garman-Klass volatility estimator and HAR-RV model for realized volatility using Python

HAR-RV ("Heterogeneous AutoRegressive model fro Realized Volatility") is pretty simple model based on the so called “Heterogeneous Market Hypothesis” which states that financial markets move as an interaction of market players acting at different frequencies (like,...

Monte Carlo for binary options, all odds for the house

A quick remake of simple Monte Carlo for binaries as I was interested whether so called "81% payout" wasn't calculated all the risks for the house (dealer). So, let's say I have proven method ("advantage"/ "edge") to win 55% of the time, and I want to calculate how...

Try to trade this support, resistance, crossover,...

Few weeks ago when talking with one trader showing countless retrospective support and resistance lines on his chart, I gave him one chart and asked to draw support and resistance levels there. He said he can clearly see "key" supports or resistances like: To be...

Returns distribution finder with Python and scipy

Following Python code uses scipy fit function for generalized extreme value distribution. What it does? It calls for MySQL data, converts from pandas to numpy array, searches for distribution, lists sorted results like: Python 1: nakagami, MLE: -inf 2: vonmises, MLE:...
Page 1 of 912345...Last »