Graph: Loading... Please wait

  • Didier

    Didier - 2008-05-19

    Hello Mark,

    I have try to simulate the graph bug :

    In the menu : Analysis/Paper Trade :

    1) Range

    2) Rules
      Buy : (macd(volume, -43))!=(macd(volume, -21))
      Sell : open > 10000.0

    Number of stocks 3

    4) Trade Value :
    by Tomorrow open
    by tomorrow open

    Then clich run.
    In the windows Paper Trade Result, select one result, right click to select "Graph"
    I have  a new windows :
        Graph paper Trade of ...
        Please wait

        But nothing occurs

    If I close the windows, and I try again but, with "Number of stocks 1" in Analysis/Paper Trade menu, it's running WELL.

    After that if I put again "Number of stocks 3" in Analysis/Paper Trade menu, now it's running well !!!

    For information there are the messages on console windows:
         [java] Merchant of Venice, 0.71 beta / 25/Fev/2007
         [java] -------------------------------------------
         [java] Copyright (C) 2003-7, Andrew Leppard (
         [java] See COPYING.txt for license terms.
         [java] (<unknown>:9442): Gtk-WARNING **: Attempting to add a widget with type GtkButton to a GtkComboBoxEntry (need an instance of GtkEntry or of a subclass)
         [java] (<unknown>:9442): Gtk-CRITICAL **: gtk_widget_realize: assertion `GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed
         [java] (<unknown>:9442): Gtk-CRITICAL **: gtk_paint_box: assertion `style->depth == gdk_drawable_get_depth (window)' failed
         [java] (<unknown>:9442): Gtk-CRITICAL **: gtk_paint_box: assertion `style->depth == gdk_drawable_get_depth (window)' failed
         [java] (<unknown>:9442): Gtk-CRITICAL **: gtk_paint_box: assertion `style->depth == gdk_drawable_get_depth (window)' failed
         [java] (<unknown>:9442): Gtk-CRITICAL **: gtk_paint_box: assertion `style->depth == gdk_drawable_get_depth (window)' failed
         [java] Exception in thread "AWT-EventQueue-0" java.lang.AssertionError
         [java]     at
         [java]     at
         [java]     at<init>(
         [java]     at
         [java]     at
         [java]     at$200(
         [java]     at$3.actionPerformed(
         [java]     at javax.swing.AbstractButton.fireActionPerformed(
         [java]     at javax.swing.AbstractButton$Handler.actionPerformed(
         [java]     at javax.swing.DefaultButtonModel.fireActionPerformed(
         [java]     at javax.swing.DefaultButtonModel.setPressed(
         [java]     at javax.swing.AbstractButton.doClick(
         [java]     at javax.swing.plaf.basic.BasicMenuItemUI.doClick(
         [java]     at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(
         [java]     at java.awt.Component.processMouseEvent(
         [java]     at javax.swing.JComponent.processMouseEvent(
         [java]     at java.awt.Component.processEvent(
         [java]     at java.awt.Container.processEvent(
         [java]     at java.awt.Component.dispatchEventImpl(
         [java]     at java.awt.Container.dispatchEventImpl(
         [java]     at java.awt.Component.dispatchEvent(
         [java]     at java.awt.LightweightDispatcher.retargetMouseEvent(
         [java]     at java.awt.LightweightDispatcher.processMouseEvent(
         [java]     at java.awt.LightweightDispatcher.dispatchEvent(
         [java]     at java.awt.Container.dispatchEventImpl(
         [java]     at java.awt.Window.dispatchEventImpl(
         [java]     at java.awt.Component.dispatchEvent(
         [java]     at java.awt.EventQueue.dispatchEvent(
         [java]     at java.awt.EventDispatchThread.pumpOneEventForFilters(
         [java]     at java.awt.EventDispatchThread.pumpEventsForFilter(
         [java]     at java.awt.EventDispatchThread.pumpEventsForHierarchy(
         [java]     at java.awt.EventDispatchThread.pumpEvents(
         [java]     at java.awt.EventDispatchThread.pumpEvents(
         [java]     at

    Do you have a idea about this problem of running ?



    • Mark Hummel

      Mark Hummel - 2008-05-20

      Hi Didier,

      Thanks for finding this bug.

      The cause of the bug was in EODQuoteRange.overlap() - it was saying that two quote ranges partially overlap if they had one end point in common. This meant that EODQuoteRange.clip() would clip the quote range to nothing and thus triggered the assertion. For example:

      QuoteRange1 = (20020903,  20070301)
      QuoteRange2 = (20030102,  20070301)

      In this case, QuoteRange1 contains QuoteRange2.

      QuoteRange1 = (20020903, 20070301)
      QuoteRange2 = (20030102, 20070305)

      In this case, QuoteRange2 partially overlaps QuoteRange1

      I've checked in a fix to CVS. While I've tried to test the change as extensively as I could, I can't help wondering if there's code somewhere which relies on the old behaviour.



    • Didier

      Didier - 2008-05-21

      Hi Mark,

      Thank you very much for a so quick answer.
      It will take more time for me to do some others tests with the new version because I'm not at home.
      I will test new CVS this WE. I'll inform you of the result.

      Thanks again


    • Didier

      Didier - 2008-05-27

      Hi Mark,

      I have tested, no problem now.

      Thanks again


    • Mark Hummel

      Mark Hummel - 2008-05-27

      Hi Didier,

      Thanks for testing the fix.

      Did Genetic Programming generate any useful rules for you, or just something like "buy when avg(cos(Phase of the moon)) - sd(day of the week) > 0"?  :)

      It's possible that there is an applicable rule based on the day of the week given that psychology affects market behaviour. On the other hand, I think what GP is finding is merely a function which exactly fits the data. Sort of like how for every possible integer sequence (a, b, c, d, e) there is a polynomial function which generates it.

      I'm thinking about seeing what happens when I apply an upper bound to the results to see if that makes the rules more generally applicable. e.g If the results exceed %1000, then the rule should be rejected. Hopefully I'll have time soon to give this a try.


    • Didier

      Didier - 2008-06-02

      Hi Mark,

      I'm just at the beginning of the using of Venice.
      My first step was to understand the target of venice : it was the type of software I wanted to create.
      My 2nd step was to fix the bugs : you have done for me.
      My third step was to increase the speed : I didn't found many solution, except running different venice programm at the same time, or increase the priority of java programm under Linux.
      My 4th step is to learn how to use GP programm and find goods rules :
          - If I use all defaut parameter, if found very complicated rule whitch excatly fits the data, but the forecast were bad.
          - I've discovered some mistakes in my database ( bad close, open ... values), so GP was using this to generate profits : I have corrected but I need to run again GP.
          - At the moment, I try to find, with GP, simples rules : the forecast are not to bad, but the gain is very low. I think I am on the good way.
          - For my point of view, if you make a software to reject the rules that exceed %1000, the result of the simulation wil be rule where the result will be 999,99%. I think the best way should be to create others functions (like actually RSI, BOL_upper .... ) and add them in the frame "GP Gondola Language Selection". In this case, if this fonction is usefull for tradding, GP will use it.
      My 5th step will be to automatically udpdate, every day, the quotes database from internet.
      My 6th step will be to add something to venice to automatically generate the list of symbols to buy/sell next day according to optimised rules.

      PS: I only a engineer who try to find good rules before starting tradding, I'm not an experimented tradder! 



Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks