Graph: Loading... Please wait

Help
Didier
2008-05-19
2013-04-24
  • Didier
    Didier
    2008-05-19

    Hello Mark,

    I have try to simulate the graph bug :

    In the menu : Analysis/Paper Trade :

    1) Range
    2/01/2003
    1/03/2007
    RNO.PA
    Unordered

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

    3)Portfolio
    50000
    100
    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 ...
        Loading.
        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:
    run:
         [java] Merchant of Venice, 0.71 beta / 25/Fev/2007
         [java] -------------------------------------------
         [java] Copyright (C) 2003-7, Andrew Leppard (aleppard@picknowl.com.au)
         [java] See COPYING.txt for license terms.
         [java]
         [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]
         [java] (<unknown>:9442): Gtk-CRITICAL **: gtk_widget_realize: assertion `GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed
         [java]
         [java] (<unknown>:9442): Gtk-CRITICAL **: gtk_paint_box: assertion `style->depth == gdk_drawable_get_depth (window)' failed
         [java]
         [java] (<unknown>:9442): Gtk-CRITICAL **: gtk_paint_box: assertion `style->depth == gdk_drawable_get_depth (window)' failed
         [java]
         [java] (<unknown>:9442): Gtk-CRITICAL **: gtk_paint_box: assertion `style->depth == gdk_drawable_get_depth (window)' failed
         [java]
         [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 org.mov.util.TradingDate.dateRangeToList(TradingDate.java:640)
         [java]     at org.mov.chart.source.PortfolioGraphSource.createGraphable(PortfolioGraphSource.java:120)
         [java]     at org.mov.chart.source.PortfolioGraphSource.<init>(PortfolioGraphSource.java:85)
         [java]     at org.mov.main.CommandManager.graphPortfolio(CommandManager.java:696)
         [java]     at org.mov.analyser.PaperTradeResultModule.graphSelectedResult(PaperTradeResultModule.java:385)
         [java]     at org.mov.analyser.PaperTradeResultModule.access$200(PaperTradeResultModule.java:57)
         [java]     at org.mov.analyser.PaperTradeResultModule$3.actionPerformed(PaperTradeResultModule.java:294)
         [java]     at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         [java]     at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         [java]     at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         [java]     at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         [java]     at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
         [java]     at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1216)
         [java]     at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1257)
         [java]     at java.awt.Component.processMouseEvent(Component.java:6038)
         [java]     at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
         [java]     at java.awt.Component.processEvent(Component.java:5803)
         [java]     at java.awt.Container.processEvent(Container.java:2058)
         [java]     at java.awt.Component.dispatchEventImpl(Component.java:4410)
         [java]     at java.awt.Container.dispatchEventImpl(Container.java:2116)
         [java]     at java.awt.Component.dispatchEvent(Component.java:4240)
         [java]     at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
         [java]     at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
         [java]     at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
         [java]     at java.awt.Container.dispatchEventImpl(Container.java:2102)
         [java]     at java.awt.Window.dispatchEventImpl(Window.java:2429)
         [java]     at java.awt.Component.dispatchEvent(Component.java:4240)
         [java]     at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
         [java]     at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
         [java]     at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
         [java]     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
         [java]     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
         [java]     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
         [java]     at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

    Do you have a idea about this problem of running ?

    Thanks

    Didier

     
    • 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.

      Regards,
      Mark.

       

       
    • 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
      Didier
      2008-05-27

      Hi Mark,

      I have tested, no problem now.

      Thanks again

      Didier

       
    • 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.

      Regards,
      Mark.

       
    • 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! 

      Regards
      Didier