Tag Info

3

What you need is more mutual information rather than Shannon entropy. It is dedicated to capture the influence of one variable on another (you can think about it as a non linear version of Pearson correlations). They are closely related since the mutual information $I$ between two variables $X$ and $Y$ reads: $$I(X;Y) = H(X,Y) - H(X|Y) - H(Y|X)$$ where $H$ ...

2

I calculate duration in Python using numpy, it's nice and simple: def durations(cfs, rates, price, ytm, no_coupons): import numpy as np mac_dur = np.sum([cfs[i]*i/np.power(1+rates[i],i) for i in range(len(cfs))])/price mod_dur = mac_dur/(1+ytm/no_coupons) return mac_dur, mod_dur

1

The code below pulls AAPL time series from Yahoo Finance, computes mean/std and simulates 100 paths that are 20 days long. Input: import pandas as pd import numpy as np from numpy.random import normal # bring data ticker = 'AAPL' url = 'http://real-chart.finance.yahoo.com/table.csv?s=%s' % ticker data = pd.read_csv(url, index_col='Date', parse_dates=True) ...

1

Native support is very limited. TradeStation's WebAPI pretty much works with any language because it is wrapped in HTTP calls using RESTful. If a platform has an API that supports std C/C++ interfaces, you can write a wrapper to extend the API to python. Search for "Calling C from Python". It is more work to code, but otherwise your choices are very ...

1

Take a look at pinkfish. Disclaimer, I am the author. http://fja05680.github.io/pinkfish/

Only top voted, non community-wiki answers of a minimum length are eligible