Jump to content
Tom Next - Daytrading Community

Search the Community

Showing results for tags 'python'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Investmentideas
    • Trading + Co.
  • Suspicious Minds
    • Voodoo-Education
    • fabian.john@gmail.comMr. Fraud & Ms. Scam
    • Red Flag
  • Off-Topic
    • Best Off
  • Trading Desk
    • Contract for Difference
    • Bitcoin
    • Financial Spread Betting
    • Futures & Optionen
    • Finanzwetten · Digitals
  • Behind the scences
    • Public Relations
    • Ich hab da mal 'ne Frage...
    • Technical Support
    • Think Tank
  • Programmierbare Handelsplattformen & Chartsoftware
    • Metatrader
    • MultiCharts
    • Ninjatrader
    • Amibroker
    • Agena Trader
    • JForex
    • Maran-Trader
    • Strategy Trader
    • Informations- und Analyseprogramme
  • Handelsansätze und Tradingstrategien im Praxistest
    • Trading Setups
  • Technische Analyse
    • Charting und Technische Analyse
    • Science
  • Social Investment Networks
    • Social Trading
  • Broker
    • MB Trading
    • Interactive Brokers
  • High Frequency / Algo Trading
    • Black Box
  • Exotics
    • Trading Sports
    • Event Futures
  • Programmierung
    • Programmiersprachen
  • tom-next.com · international
    • International Community
  • Tech Zone
    • Helpdesk
    • IT, Internet, Software

Blogs

  • Call the Shots
  • siscop's Blog
  • First-Level-Trading
  • Ecart's Blog
  • DarthTrader's Blog
  • Henrik's Blog
  • røøt66
  • stefan's Blog
  • tinozi's Blog
  • - Maerl Brontius -
  • Rumpel's Blog
  • Proudroses' Blog
  • Vola's Blog
  • OS_Trading
  • Mako's Alte Zeiten Blog
  • Maerl Brontius' Blog
  • Elad Nava's Blog
  • Corporate Blog
  • Mythos Down Under
  • 17:33h
  • PermissionControll's Blog
  • tester2's Blog
  • IPS' Blog
  • Exchange - Developement
  • Ein Externer Blog
  • MetaTraders
  • Der TEFEx Millionär
  • Lobo's Schnipsel Blog
  • Betfair-Review
  • My-privatbroker
  • Jimboo's Blog
  • KI vs. Evolution
  • Let the machines trade

Categories

  • MT4 Commmunity
    • Community Projekte
    • Einzelprojekte
    • Tickdaten
    • Misc (internal stuff)
  • MT4 Codes
    • A-Z
  • e-Book Exchange
    • .pdf *mixed*
    • Technische Analyse
    • Trading Know How
    • Metatrader/MQL
    • FX Know How
  • Contract for Difference
  • Miscellaneous
  • Allgemein/ Unsortiert
  • Manuals & User Guides
  • Finanzmarktaufsicht
  • Community Projekte
  • Ninjatrader

Calendars

  • Finanzkalender
  • Community Kalender

Categories

  • New Features
  • Other

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Wohnsitz


Interessen


Name des Mitglieds

Found 1 result

  1. Hallo Zusammen, nach 2 Monaten habe ich frustriert aufgegeben, mit MQL5 und Ctrader eine saubere Lösung zu programmieren, weil einfach die Anbindung für GPU-Power, genügend freie AI, etc. Bibliotheken fehlen. Fazit: nach einiger Recherche lerne ich eine neue Programmiersprache und baue hier auf die freien Bibliotheken auf. Da ich wirklich von 0 anfange, muss ich natürlich erstmal Finanzdaten visualisieren. Ich habe mich entschlossen, erstmal mit Aktien EOD (Yahoo Finance Histories) anzufangen und will den Fortschritt hier mit euch teilen, soweit Interesse besteht. Ziel ist es, Lifedaten von MT4 & 5, cTrader und L&P Daten live in eine Mongo-DB zu laden, die Daten automatisch aufzubereiten, zu slicen und anschließend zu plotten (Charts). Danach werden die Bibliotheken von R, Python, Anaconda und Mathlab angezapft und via Matrix-KPI-Metering und anderen mathematischen & statistischen Verfahren gewertet und der Computer soll mit GPU-Power möglichst präzise Vorhersagen (Predictions) errechnen können. Hier die ersten Codesnippets zum visualisieren von EOD-CSV-Daten. # -*- coding: utf-8 -*- """ Created on Tue Jan 17 09:30:18 2017 @author: MarcusLencyzk """ """Slice and plot""" import os import pandas as pd import matplotlib.pyplot as plt def plot_selected(df, columns, start_index, end_index): """Plot the desired columns over index values in the given range.""" plot_data(df.ix[start_index:end_index, columns], title="Selected Data") def symbol_to_path(symbol, base_dir="data"): """Return CSV file path given ticker symbol.""" return os.path.join(base_dir, "{}.csv".format(str(symbol))) def get_data(symbols, dates): """Read stock data (adjusted close) for given symbols from CSV files.""" df = pd.DataFrame(index=dates) if 'SPY' not in symbols: # add SPY for reference, if absent symbols.insert(0, 'SPY') for symbol in symbols: df_temp = pd.read_csv(symbol_to_path(symbol), index_col='Date', parse_dates=True, usecols=['Date', 'Adj Close'], na_values=['nan']) df_temp = df_temp.rename(columns={'Adj Close': symbol}) df = df.join(df_temp) if symbol == 'SPY': # drop dates SPY did not trade df = df.dropna(subset=["SPY"]) return df def normalize_data(df): """Nomalize stock prices using the first row of the dataframe.""" return df/ df.ix[0,:] def plot_data(df, title="Stock prices"): """Plot stock prices with a custom title and meaningful axis labels.""" ax = df.plot(title=title, fontsize=12) ax.set_xlabel("Date") ax.set_ylabel("Price") plt.show() def test_run(): # Define a date range dates = pd.date_range('2012-01-01', '2016-12-31') # Choose stock symbols to read symbols = ['MSFT', 'IBM', 'TXN'] # SPY will be added in get_data() # Get stock data df = get_data(symbols, dates) # Slice and plot plot_selected(df, ['SPY', 'IBM', 'MSFT', 'TN'], '2012-03-01', '2016-04-01') if __name__ == "__main__": test_run() Sieht noch sehr "simple" aus, funktioniert aber schon mal, siehe hier das Ergebnis:
×
×
  • Create New...