Back to Community
Gebert-indicator

I would like to create an algo which follows these rules (description in german),
for each one point:
p1 - last interest rate change of ECB a reduction https://www.quandl.com/data/BUNDESBANK/BBK01_SU0202-ECB-interest-rates-for-main-refinancing-operations-End-of-month
p2 - last Euro area HICP inflationrate under the value of the same month in the last year https://www.quandl.com/data/ECB/RTD_M_S0_N_P_C_OV_A-Euro-area-HICP-Overall-index-Annual-growth-rate
p3 - USD over the value from twelve month https://www.quandl.com/data/CURRFX/EURUSD-Currency-Exchange-Rates-EUR-vs-USD
https://www.quandl.com/data/CURRFX/USDEUR-Currency-Exchange-Rates-USD-vs-EUR
pt - between 1th November and 30th April

pS = p1+p2+p3+pt
if pS = 3 to 4 points buy the DAX
else if pS = 2 points last signal
else if pS = 0 to 1 point sell the DAX

the calculation will be repeated every week

Don't know if these variables are best, but it was easier for me to describe it like this.

Thanks for any help!

4 responses

Hi Kim, I don't mind to help you but we cant sell the DAX in terms of futures, but we could buy and sell the DAX etf

regarding adding those P1...P3 : are these raw data additions (no transforms)
and

what means pt?

can you maybe show the calculation for a certain date?

PB

DAX etf sounds good. Are there DAX short ETFs, too?
actually money is parked, when the DAX is sold, but could be interesting to buy DAX short ETFs instead.

pt - 1th November to 30th April https://www.quandl.com/data/BUNDESBANK/BBK01_SU0202-ECB-interest-rates-for-main-refinancing-operations-End-of-month

if the marked condition is given, than pt=1, else pt=0

pS is the Sum of p1+p2+p3+pt

sure:
on 5th May 2015
last interest rate change of ECB a reduction? yes, so p1=1
last Euro area HICP inflationrate under the value of the same month in the last year? yes, so p2=1
USD over the value from twelve month? yes, so p3=1
between 1th November and 30th April? no, so pt=0
pS=p1+p2+p3+pt=1+1+1+0=3
"if pS = 3 to 4 points buy the DAX else if pS = 2 points last signal
else if pS = 0 to 1 point sell the DAX"
so buy the DAX etf

and this - should have written it in the first post - will be repeated every week

p*t* stands just for time, could be called p4.

hope now it's more understandable, sorry for the missing information... changed it in the first post

At present, Quantopian only allows trading stocks and ETFs on major US exchanges. It has announced it is going to allow futures.

But, surprisingly, you can buy the DAX - more specifically, the Recon Capital DAX Germany ETF (NASDAQ: DAX). Very low volume, though. See https://finance.yahoo.com/q/hp?s=DAX&d=6&e=21&f=2015&g=d&a=9&b=23&c=2014&z=66&y=132.

That means you should calculate the number of shares yourself and use the order function - not the other order_* functions which depend on the price of your security to be available in data in the current time bar, and crash with a KeyError when it is not. See
https://www.quantopian.com/posts/keyerror-with-order-target-percent#55ad235c0a1dc46d7b00057a and the posts above it.

The iShares MSCI Germany (EWG) is much older and better known, and has daily share volume in the millions: https://finance.yahoo.com/q/hp?s=EWG .