ipython notebook example - Matlab, R project and Python | futures io social day trading
futures io futures trading

ipython notebook example
Updated: Views / Replies:1,108 / 1
Created: by enjoyaol Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 100,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Thread Tools Search this Thread

ipython notebook example

  #1 (permalink)
Paris, France
Trading Experience: Intermediate
Platform: MT4, Amibroker, Custom
Favorite Futures: EUR/USD
Posts: 44 since Jan 2012
Thanks: 5 given, 27 received

ipython notebook example

Hi, for those who love python and ipython, here is a small example of how to use it.
This notebook loads some CSV ohcl data and makes statistics about days of the week and month, etc..

It's a simple example to show you the power of ipython and pandas.


Have fun !

import datetime
import pandas as pd
import numpy as np

def dateparse(s):
    return datetime.datetime.strptime(s, "%d.%m.%Y %H:%M:%S.%f")

# <codecell>

INPUT_FILE = r"data/EURUSD_Candlestick_1_D_BID_01.12.2011-04.01.2014.csv"

tab = pd.read_csv(INPUT_FILE, date_parser = dateparse, parse_dates=True, index_col=[0])
tab['O-C'] = ((tab['Close'] - tab['Open']) * 100) / tab['Close']
tab['L-H'] = ((tab['High'] - tab['Low']) * 100) / tab['High']

# <codecell>

grouped = tab.groupby(tab.index.weekday)

# <headingcell level=3>

# Sum of percent changes per DAY of the week sorted by LH desc

# <codecell>

perdays = tab.groupby(tab.index.weekday).agg({'O-C': np.sum, 'L-H' : np.sum})
perdays.columns = ['Sum of OC % change', 'Sum of LH % change']
perdays.sort(columns = 'Sum of LH % change', ascending = False)

# <headingcell level=3>

# Sum of percent changes per WEEK of the year

# <codecell>

perweeks = tab.groupby(tab.index.weekofyear).agg({'O-C': np.sum, 'L-H' : np.sum})
perweeks.columns = ['Sum of OC % change', 'Sum of LH % change']
perweeks.sort(columns = 'Sum of LH % change', ascending = False)
#displays the 10 best weeks

# <headingcell level=3>

# Most traded day of the week (by volume)

# <codecell>

perdays = tab.groupby(tab.index.weekday).agg({'Volume': np.sum})
perdays.columns = ['Sum of Volume']
perdays.sort(columns='Sum of Volume', ascending = False)

# <headingcell level=3>

# Most traded WEEK of the year (by volume)

# <codecell>

perweeks = tab.groupby(tab.index.weekofyear).agg({'Volume': np.sum})
perweeks.columns = ['Sum of Volume']
perweeks.sort(columns='Sum of Volume', ascending = False)

Last edited by enjoyaol; January 16th, 2014 at 10:05 AM.
Reply With Quote
The following 4 users say Thank You to enjoyaol for this post:
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.


futures io > > > > ipython notebook example

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

futures io is celebrating 10-years w/ over $18,000 in prizes!

Right now

Similar Threads
Thread Thread Starter Forum Replies Last Post
bare bones day trading notebook KillerDana Trading Journals 3 September 20th, 2012 09:12 AM

code, data, ebook, ebooks, eurusd, how to, information, matlab, matlab trading, python, python trading, r project, r trading, statistics, traded, volume

All times are GMT -4. The time now is 01:27 PM. (this page content is cached, log in for real-time version)

Copyright © 2019 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432 WhatsApp Business, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2019-06-17 in 0.16 seconds with 14 queries on phoenix