Skip to content
Numerical Method , home
Menu

Forum Applications Trading Strategies (Algo Quant)

Elliotts Pair-trading: Loading data from excel

  1. changminParticipant 2014-10-31 at 8:55 pm

    Hello,

    Have anyone load in your own data ie from excel to Algo Quant to test out? I do not know how to load in our data to it.

    If anyone knows, please teach me.

    Thank you very much Leo

  2. RyuParticipant 2014-11-01 at 3:20 pm

    AlgoQuant can download data from free sources such as Yahoo Finance. See this for an example:

    http://redmine.numericalmethod.com/projects/public/repository/svn-algoquant/entry/core/src/test/java/com/numericalmethod/algoquant/model/elliott2005/strategy/Elliott2005v10Test.java

    (Your version is going to be different from the svn version because the release is not yet updated.)

  3. changminParticipant 2014-11-02 at 6:11 pm

    Hi Ryu,

    I mean load up my own data. My data is fixed income data. You wont be able to find it from yahoo finance. My data is in Excel. I just need your software to read in my data and try your strategy to see if it works or not.

    Thank you Leo

  4. RyuParticipant 2014-11-02 at 6:35 pm

  5. changminParticipant 2014-11-04 at 1:23 am

    Dear Ryu,

    I found the two files in algoquant-0.8.0. I run the CsvCacheLoaderTest.java in algoquant-0.8.0. I have two questions:

    1. How do I check the data, “test-data/csv/AU.csv” is loaded?

    2. All the lines in CsvCacheLoaderTest.java become black colour instead of remaining at its original different colours.

    Thank you for your advices Leo

  6. RyuParticipant 2014-11-04 at 4:13 am

    I am not sure if I understand.

    1. Can you just print them out, or view them in a debugger?

    2. I am not sure what you mean. Can you post a screenshot please?

  7. changminParticipant 2014-11-04 at 6:47 pm

    Hi Ryu,

    1. How do you see the values in debugger? I cant find the variable name that is associated with the data.
    2. In the attached picture, on the left-hand side of it shows that all the wordings are black after I run the simulation. On the left is the normal colourful workings.

    Thank you very much for your help Leo

    Attachments:

    You must be logged in to view attached files.

  8. RyuParticipant 2014-11-04 at 7:22 pm

    You can examine the variable cache. Are you using Eclipse, you can refer articles like this for learning how to use its debugger: http://www.vogella.com/tutorials/EclipseDebugging/article.html

    I don’t know why the code coloring disappears but it is an eclipse problem, not algoquant’s.

  9. changminParticipant 2014-11-05 at 10:01 pm

    Dear Ryu,

    I can use CsvCacheLoaderTest.java to load in my data and verify the values. However, when I try to load data to demoElliott2005_010.java, I could not. I do not know how to create depthCaches using the technique in CsvCacheLoaderTest. I attach the source code and the error messages.

    Thank you for your advises. Leo

    Attachments:

    You must be logged in to view attached files.

  10. RyuParticipant 2014-11-06 at 4:19 pm

    First, you need a throw-exception clause:

        public static void main(String[] args) throws IOException {
    

    Second, you need to create a DepthCaches. E.g.,

            // create source of market depth
            DepthCaches depthCaches = new DepthCaches();
            depthCaches.addCache(product1, cache1);
            depthCaches.addCache(product2, cache2);
    
  11. changminParticipant 2014-11-06 at 8:34 pm

    Dear Ryu,

    It is not working still. I made some changes and I attached the source code.

    I encountered the error at
    // execution summary
    List<Execution> allExecutions = tradeBlotter.getAllExecutions();
    logger.info(String.format(“%d executions: %s”, allExecutions.size(), allExecutions));
    

    The compiling error says the following

    Exception in thread “main” java.lang.Error: Unresolved compilation problem: Execution cannot be resolved to a type

    at com.numericalmethod.algoquant.model.elliott2005.demo.DemoElliott2005_010_ccm.main(DemoElliott2005_010_ccm.java:154)

    Please advise. Thank you very much for your help Leo

    Attachments:

    You must be logged in to view attached files.

  12. changminParticipant 2014-11-07 at 8:45 pm

    Dear Ryu,

    I got it working. I attached the graph

    The strategy could not work on my data. May I seek your advises on what can be changed ie parameters?

    Thank you Leo

    Attachments:

    You must be logged in to view attached files.

  13. RyuParticipant 2014-11-08 at 4:36 am

    There are practically infinitely many things you can do starting from here. You can change the calibration window, the calibration period, the trading sizes, the way you compute the mean (long term vs. short term), the entry and exit signals, etc. This is the fun part of “designing” a trading strategy. You need to use a lot of imagination here.

    This is why we open up the source code so you can design and code up your own mean-reversion strategy based on Prof. Elliotts’ framework.