Required items for Canada

2013-01-02
2013-03-13
  • Gord Tomlin

    Gord Tomlin - 2013-01-02

    I am testing out jStock and there is a lot to like. However there are a couple of things that would really help Canadians:

    1. My tests show that selling part of a position treats the shares in the position as lots, and selects a lot for the sale. In Canada, all shares of a position in a given security are considered identical. You do not have cheaper shares and more expensive shares. For example, if you bought 100 shares of X at $1 and later bought another 100 shares of X at $2, then under Canadian tax law each of your 200 shares would have an "adjusted cost base" of $1.50. If you then sold 100 shares at $3:
    - your gain would be ($3 * 100) - ($1.50 * 100)  = $150
    - your remaining position would have a purchase value of ($1.50 * 100) = $150
    This could be handled at the portfolio level by an option specifying whether purchase price of sold shares should be calculated using FIFO (as jStock presently appears to do) or using weighted average.

    2. Include the TSX-V exchange in the Canadian database.

     
  • yccheok

    yccheok - 2013-01-03

    Dear gtomlin,

    Thank you for your suggestion. It makes us understand the need of canadians.

    However, to implement weighted average, there are some difficulties I'm still in considering.

    I take your case as example.

    [I have the following buy portfolio]
    Buy
    ===
    + SCOTIA BANK               200     $1.50
        + SCOTIA BANK   1/1/13  100     $1.00
        + SCOTIA BANK   1/2/13  100     $2.00
        
    [Then, I perform 100 units of SCOTIA BANK sell out of total 200 units]
        
    Buy
    === 
    + SCOTIA BANK               100     $1.50   <-- It doesn't tally right here.
        + SCOTIA BANK   1/1/13  100     $1.00   <-- It doesn't tally right here.
        
    Sell
    ====
    + SCOTIA BANK               100     $1.50
        + SCOTIA BANK   1/2/13  100     $1.50
        
        
    Initially, we are using UI tree design is that,
    - User able to keep track of every single transaction
    - User able to view the sum of all transactions.
    If we were using weighted average, we need to turn buy tree into
    Buy
    ===
    + SCOTIA BANK               200     $1.50
        + SCOTIA BANK   1/1/13  100     $1.50   <-- Bought with actual price $1.00
        + SCOTIA BANK   1/2/13  100     $1.50   <-- Bought with actual price $2.00
    

    From the above, you can see user losts his ability to keep track of every single transaction.

    Do you have any idea how can we make everything looks make sense, if we were to implement weighted average?

     
  • yccheok

    yccheok - 2013-01-03

    I don't know there are 2 stock exchanges in canada. Toronto and TSX-V? May I know what is the difference among the 2? In order to prepare database for TSX-V, I need a complete list of stocks as in the following format.

    http://jstock-static.appspot.com/stocks_information/israel/stocks.csv

    Do you have idea where I can get such information?

     
  • Gord Tomlin

    Gord Tomlin - 2013-01-09

    The reason why your example did not balance is that you still sold from a single lot. If you are doing weighted average, you need to proportionally remove shares from each lot when you do a partial sell:

    Buy
    ===
    + SCOTIA BANK               200     $1.50
        + SCOTIA BANK   1/1/13  100     $1.00
        + SCOTIA BANK   1/2/13  100     $2.00
        
    [Then, I perform 100 units of SCOTIA BANK sell out of total 200 units]
        
    Buy
    === 
    + SCOTIA BANK               100     $1.50   <-- It doesn't tally right here.
        + SCOTIA BANK   1/1/13   50     $1.00
        + SCOTIA BANK   1/2/13   50     $2.00
        
    Sell
    ====
    + SCOTIA BANK               100     $1.50
        + SCOTIA BANK   1/1/13   50     $1.00
        + SCOTIA BANK   1/2/13   50     $2.00
    
     
  • yccheok

    yccheok - 2013-01-17

    OK. I pretty much get what you mean. Give me sometime, we will implement this…

     

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

Sign up for the SourceForge newsletter:





No, thanks