1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in


From jstock

Jump to: navigation, search

The next JStock release will be 1.0.6

  • Re-factor current JStock code base, so that we can move further.
    • Migrating from Java Calendar to Joda Date Time - Currently, our Stock.getCalendar is comparatively slow. We should consider to use long timestamp or Joda DateTime. We need to perform benchmark before and after migration, to see how much performance we had gain.
    • Separate portfolio buy and sell data structure, from GUI code. This enable us to use a better future alternative than JXTreeTable. Currently, JXTreeTable doesn't support sorting.
    • Be extremely careful on old xstream file during migration. Backward compatible is a must.

  • Implement currency exchange for oversea stock transaction.

  • Have comparison chart to compare multiple portfolios for single country.

  • Have comparison chart to compare multiple portfolios for multiple countries.

  • Have a better splash screen. We do not want to gray dull color anymore.

  • Implement stock split feature. (Released in 1.0.6)

  • Make Stock Indicator Editor able to support MACD and stochastic. Perhaps with a new block component named Advanced TA block?

  • Change enum Board and Industry to class similar to Code and Symbol
    • Currently, our Board and Industry are designed as enum. However, to have a proper enum, you need to know every possible value for the members. This is extremely difficult for such a large world stock markets. We need to design them, so that their constructor may accept String. After the changes, we need to ensure all previous XML files still can be loaded without problem. We also need to be caution on the memory usage, due to additional String being used.

  • Check the CVS library used by JStock can properly escape double quote character.

  • Looking for alternative server
    • Page to list all stock codes no longer working. This raise us an alert, that we urgently need a secondary server. Will Google Finance able to provide us such information?

  • Able to view all watchlist at one time.
    • Instead of using radio button styled menu items, We may have checkbox styled menu items, to let user select/de-select their desired watchlist.
    • The key difficulty here is that, if user are currently viewing 2 watchlist at the same time, once he enters the stock code through auto-drop-down combo box, the newly entered stock code should belong to which watchlist?
    • If there are 2 same stock codes within different watchlist, and user trying to delete it when 2 watchlist are being viewed at the same time, the stock code should be removed from which watchlist? Or shall it be removed from both watchlist?
    • The key here is, we want to give user least surprise on application behavior.

  • Of course. As many as possibe bug fixed shall go in here.


Some offline study on the performance of Calendar and Joda DateTime

Speed Test for DateTime

       Time taken : 469ms     
       for (int i = 0; i < 500000; i++) {
           DateTime t = new DateTime();

Memory Usage for DateTime

       List<DateTime> l = new ArrayList<DateTime>();
       while (true) {
           l.add(new DateTime());
       Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
           at java.util.Arrays.copyOf(Unknown Source)
           at java.util.Arrays.copyOf(Unknown Source)
           at java.util.ArrayList.ensureCapacity(Unknown Source)
           at java.util.ArrayList.add(Unknown Source)
           at jodatestmemory.Main.main(Main.java:24)

Speed Test for Calendar

       Time taken : 1357ms     
       for (int i = 0; i < 500000; i++) {
           Calendar c = Calendar.getInstance();

Memory Usage for Celendar

       List<Calendar> l = new ArrayList<Calendar>();
       while (true) {
       Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
           at java.util.Calendar.<init>(Unknown Source)
           at java.util.GregorianCalendar.<init>(Unknown Source)
           at java.util.Calendar.createCalendar(Unknown Source)
           at java.util.Calendar.getInstance(Unknown Source)
           at jodatestmemory.Main.main(Main.java:25)
Personal tools