Jupyter Notebook

Hello, I recently installed Jupyter Notebook. I watched the “Machine learning Intro with CloudQuant and Jupyter Notebooks” video on youtube. I was wondering if anyone had any advice on collecting data or any sample of code for collecting data? Thank you.


  • ptunneyptunney Posts: 246
    edited June 2018

    That really depends on two things.

    1. What is your programming proficiency?
    2. How much data do you want to collect?

    In the case of the video you mentioned, that was a very experienced trader who was collecting huge amounts of data to feed into a Machine Learning system.
    To start off with we suggest collecting a very small amount of data and building up from there.
    In CloudQuant you can collect data throughout the day.
    You can output the data it in one of two ways. Either to a file or through the order_algo function.
    We generally recommend using the order_algo because you often want two types of data.

    1. The status of certain variables at the time of entry
    2. The status of certain variables at the time of exit

    What data you collect is entirely up to you. The more data you calculate and collect the slower your backtest will run.
    So, for example, to start with you can simply collect the bid and ask at the time of the entry and exit orders.
    You simply add a dictionary to the order statement.

    So for a long entry on a market order that would look something like this.

    self.data_collection = {'bid': md.L1.bid, 'ask': md.L1.ask}
        order.algo_buy(self.symbol, algorithm="market", intent="init",order_quantity=100,collect=self.data_collection)

    Then, after the backtest has completed you download the trades.csv file and the collected data is there together with your trade data.
    The field names are preceded by entry_ for data collected on your entry order and exit_ for data collected on your exit order.

    See the documentation pages for all the different kinds of data you can collect. You can also pull data from the daily or minute bars in the system and pass them to a TALIB function call to calculate industry standard indicators - https://app.cloudquant.com/#/glossary/64

    The Future, CloudQuant.ai
    We will soon be launching cloudquant.ai which will allow direct access to some of the underlying data.
    There are times when you do not need a backtest in order to do research or collect data for Machine Learning.
    For example, if you wanted to know a very unique variable that could only be calculated in the moment in the middle of a trading day you would do that using a backtest in CloudQuant.
    But if you were wanting some very static data, like daily or minute bar close prices for x periods for y symbols then CloudQuant.ai would allow you to very simply pull just that data.

    File Reading/Writing
    If you wanted to capture the information into a file you can use the file reading/writing functions..
    https://app.cloudquant.com/#/glossary/143 - read file
    https://app.cloudquant.com/#/glossary/148 - write file
    https://app.cloudquant.com/#/glossary/56 - advanced read
    https://app.cloudquant.com/#/glossary/57 - advanced write

    Those files will appear on the CloudQuant website under the USER DATA tab.

    Machine Learning with Trevor Trinkino
    Part 1, Part 2 , Part 3.

Sign In or Register to comment.