| Author |
Message
|
| jdunn72 |
Posted: Sun Apr 02, 2006 7:13 pm Post subject: |
|
|
 Member of The Month March

Joined: 26 Jan 2006
  Posts: 1407 This Month: 0
11261.55 e$
Net worth: 11,261.55 Portfolio Value: 0.00 Monthly Return: 0.00% Trades this month: 0 Churn Rate: 0.00%Items
|
| Ok, I figured that because a trade not closed is not a monetary gain until sold, but thats just a technicality. |
|
| Back to top |
|
 |
| jdunn72 |
Posted: Sun Apr 02, 2006 7:19 pm Post subject: |
|
|
 Member of The Month March

Joined: 26 Jan 2006
  Posts: 1407 This Month: 0
11261.55 e$
Net worth: 11,261.55 Portfolio Value: 0.00 Monthly Return: 0.00% Trades this month: 0 Churn Rate: 0.00%Items
|
Wait, I did state this but, maybe it was different in actuality....
Positions held and closed would be returned as t$e.
At the beginning of each month all monies would be update queried as t$e.
And percentage returned on investment query would only pull t$e and state of current positions relative to the value of t$e reset and recorded at the beginning of the month as some var like begin$e and TotBTA is reset to zero as well at each beginning. |
|
| Back to top |
|
 |
| jdunn72 |
Posted: Sun Apr 02, 2006 7:21 pm Post subject: |
|
|
 Member of The Month March

Joined: 26 Jan 2006
  Posts: 1407 This Month: 0
11261.55 e$
Net worth: 11,261.55 Portfolio Value: 0.00 Monthly Return: 0.00% Trades this month: 0 Churn Rate: 0.00%Items
|
I just took a look at the beta board, that is a fantastic idea about going retroactive in the database, and at least we can get a real feel for how well we have done in the past. Good work Dave, I'll be looking forward to the implimentation of your coding?  |
|
| Back to top |
|
 |
| Trading Simulator |
Posted: Sun Apr 02, 2006 7:29 pm Post subject: |
|
|
Investing Sr. Associate

|
| jdunn72 wrote: | | Ok, I figured that because a trade not closed is not a monetary gain until sold, but thats just a technicality. |
No, it's not.
If I buy stock last month for 10 and it rises to 15 last month then it is very important that the $5 gain per share has zero impact on this month's portfolio return calculation. If the stock stays at 15 the entire month, I have a 0% return. If the stock drops, I have to show a loss. The only way to do that is track what each individual holding was at the end of the month. Without this, I can't track holdings that span more than one month.
I went back and reread your notes, and the process as I've outlined it is very similar, but I believe simpler. The basic idea of having a second trading currency was excellent, and as I said, it certainly got me on the right track.
I don't want to / can't track every single e$ transaction that a user does. This solution does not require me to do that. Nor does it require me to change the definition of e$ and maintain two different currency types as outlined in your suggestion. I only need to track / update t$, which is completely behind the scenes and has zero impact on e$ transactions of any kind. There are way too many places that e$ is used (shop, posting rewards, donations) to change how e$ are handled.
As trades are made, purchases are first applied to proceeds from prior sales (reinvested) and then to new money (investments) and the difference is that new money increases the baseline for your portfolio return calculation this month. That's it. What I have to do is solve the t$ issue that I mentioned in the last post, and check out how t$ transactions would look if the stock is sold at a loss instead of a gain. |
|
| Back to top |
|
 |
| Trading Simulator |
Posted: Sun Apr 02, 2006 7:33 pm Post subject: |
|
|
Investing Sr. Associate

|
| jdunn72 wrote: | Positions held and closed would be returned as t$e.
At the beginning of each month all monies would be update queried as t$e. |
But I think that's too complicated. And I don't believe it's necessary.
I have two new variables stored on the user record. The portfolio baseline (which can increase during a month) and t$ (which starts every month at zero and can increase / decrease as trades are made). At the end of the month we get the total portfolio value of current holdings and calculate the gain for each of them this month based on the last month close. Or if the position was opened this month, then the entire gain is used. Any gains from sales that are not reinvested will be denoted as a + balance in the t$ account and treated as a gain as well. Divide that by the portfolio baseline and you have the return %.
The bottom line is that reinvesting proceeds from sales this month should not reduce your monthly return % as they do now. This solution does that.
It may very well be that you and I are saying the same thing, and arguing from a different direction.
I'm signing off now, and going back to the math so I can make 25% = 33% or whatever needs to happen.  |
|
| Back to top |
|
 |
| Trading Simulator |
Posted: Sun Apr 02, 2006 7:37 pm Post subject: |
|
|
Investing Sr. Associate

|
| Trading Simulator wrote: | | Any gains from sales that are not reinvested will be denoted as a + balance in the t$ account and treated as a gain as well. |
No, that's wrong. Non-reinvested gains are represented by the gain in the holding that was sold, and do not need to be recounted. |
|
| Back to top |
|
 |
| jdunn72 |
Posted: Sun Apr 02, 2006 8:34 pm Post subject: |
|
|
 Member of The Month March

Joined: 26 Jan 2006
  Posts: 1407 This Month: 0
11261.55 e$
Net worth: 11,261.55 Portfolio Value: 0.00 Monthly Return: 0.00% Trades this month: 0 Churn Rate: 0.00%Items
|
I think that's great, I can't wait to see it in action.  |
|
| Back to top |
|
 |
| jdunn72 |
Posted: Sun Apr 02, 2006 9:05 pm Post subject: Re: Good news! |
|
|
 Member of The Month March

Joined: 26 Jan 2006
  Posts: 1407 This Month: 0
11261.55 e$
Net worth: 11,261.55 Portfolio Value: 0.00 Monthly Return: 0.00% Trades this month: 0 Churn Rate: 0.00%Items
|
| Trading Simulator wrote: | | Trading Simulator wrote: | | Compare this to a scenario where the entire transaction takes place in a single month. You start the month with zero, buy a stock at 15 and sell at 20. Your baseline is 1500, your t$ are 2000. What is your return? 25%. |
Wrong. I don't know where my head was on this one, but the return is 33%. The baseline is 1500, the gain is 500.
I believe that the two scenarios I outlined need to balance, or the math doesn't work. I need to rethink some of this a bit more, obviously. |
Ok, I see where you are now (I think). Once you get the ROI for the month it should be re-set to zero for the monthly var and continously tracked in a separate updated var for longterm ROI data as an average monthly performance return, that way you won't have to split hairs on exactness for the longterm ROI percentage. I think everyone would be satisfied to see an exact figure for the month and an average monthly performance ROI % which could easily be multiplied by 12 to get a yearly average and a counter could keep track of how many months the user has been trading and each months ROI could be averaged into the prior average. Could this help?  |
|
| Back to top |
|
 |
| jdunn72 |
Posted: Sun Apr 02, 2006 9:10 pm Post subject: |
|
|
 Member of The Month March

Joined: 26 Jan 2006
  Posts: 1407 This Month: 0
11261.55 e$
Net worth: 11,261.55 Portfolio Value: 0.00 Monthly Return: 0.00% Trades this month: 0 Churn Rate: 0.00%Items
|
Then at the top of our portfolios it could show current, last months, and average Monthly Percent returned figures.  |
|
| Back to top |
|
 |
| jdunn72 |
Posted: Sun Apr 02, 2006 9:14 pm Post subject: |
|
|
 Member of The Month March

Joined: 26 Jan 2006
  Posts: 1407 This Month: 0
11261.55 e$
Net worth: 11,261.55 Portfolio Value: 0.00 Monthly Return: 0.00% Trades this month: 0 Churn Rate: 0.00%Items
|
| The reason I suggested it this way is so that you might not have to track each holding, but just the dollars earned in total vs invested from them as aggregate. |
|
| Back to top |
|
 |
|
|
 |
| Trading Simulator |
Posted: Sun Apr 02, 2006 9:17 pm Post subject: Re: Good news! |
|
|
Investing Sr. Associate

|
| Trading Simulator wrote: | | Trading Simulator wrote: | | Compare this to a scenario where the entire transaction takes place in a single month. You start the month with zero, buy a stock at 15 and sell at 20. Your baseline is 1500, your t$ are 2000. What is your return? 25%. |
Wrong. I don't know where my head was on this one, but the return is 33%. The baseline is 1500, the gain is 500.
I believe that the two scenarios I outlined need to balance, or the math doesn't work. I need to rethink some of this a bit more, obviously. |
I have adjusted how t$ are updated on transaction sales, and the numbers now work. I've gone through about a dozen scenarios so far (don't worry I won't post them) including some with losses, and some with gains from a prior month that carry over to a loss, and so on, and they all appear to be working out.
| jdunn72 wrote: | | Ok, I see where you are now (I think). Once you get the ROI for the month it should be re-set to zero for the monthly var and continously tracked in a separate updated var for longterm ROI data as an average monthly performance return, that way you won't have to split hairs on exactness for the longterm ROI percentage. |
Ah, but I believe that I can track long term ROI exactly.
If I'm in March, I can see what my % return was for January. I cannot go back and see the t$ transactions for that month, but it doesn't matter. Since I plan to keep records in a separate database table by user and by month/year that show the port beginning balance, ending balance, calculated gain, and the numbers required to calculate that gain, I will be able to (from month to month) be able to recreate exactly how the numbers are. Each month % will be accurate, and the YTD (year to date) will be based on the same process except over a longer time period. The starting portfolio balance + realized gains + unrealized gains becomes the ending balance for the month, and the beginning balance for the following month.
There will be a spiffy screen that allows you to review your performance over time.
That's the theory, anyway. I'm working on the MTD return first (which is looking very good) and trying to keep YTD and LTD return calculations in the back of my mind so I don't do anything stupid for MTD that will prevent me from doing the other. YTD = Year to date and will be based on starting positions from Jan 1 of a given year, and LTD is Life to Date and will track your portfolio performance since Jan 1, 2006 to current. I don't plan to go back and recalc returns for 2005, so the Life To Date will be based on only this year.
What's the difference between YTD and LTD? Nothing, for 12 months. But at the end of Jan 2007 your YTD will have started over, and your LDT will include 13 months of portfolio history. |
|
| Back to top |
|
 |
| Trading Simulator |
Posted: Sun Apr 02, 2006 9:22 pm Post subject: |
|
|
Investing Sr. Associate

|
One of the stats for mutual funds is "churn" or turnover rate. I think I can calculate that too. Someone with one holding for an entire month has a zero churn rate. Someone that trades the same money 20 times has a 20 churn rate. Or something like that. Anybody know the formal definition for this?
It's just a way to measure how active a trader you are. |
|
| Back to top |
|
 |
| jdunn72 |
Posted: Sun Apr 02, 2006 9:44 pm Post subject: |
|
|
 Member of The Month March

Joined: 26 Jan 2006
  Posts: 1407 This Month: 0
11261.55 e$
Net worth: 11,261.55 Portfolio Value: 0.00 Monthly Return: 0.00% Trades this month: 0 Churn Rate: 0.00%Items
|
| Trading Simulator wrote: | One of the stats for mutual funds is "churn" or turnover rate. I think I can calculate that too. Someone with one holding for an entire month has a zero churn rate. Someone that trades the same money 20 times has a 20 churn rate. Or something like that. Anybody know the formal definition for this?
It's just a way to measure how active a trader you are. |
No, I am not sure what that term is but, now I am beginning to feel wowed! This is gonna be great, so whats the updated ETA on this?  |
|
| Back to top |
|
 |
| Trading Simulator |
Posted: Mon Apr 03, 2006 3:31 am Post subject: Re: Good news! |
|
|
Investing Sr. Associate

|
| Trading Simulator wrote: | Back to the original scenario where you had a holding from last month that you sold this month, how is the return calculated? You only get credit this month for the gains this month. Anything else was credited in the prior month, and you don't get credit for the same increase (or decrease) twice.
Start of month:
e$1500 portfolio value (one stock at $15, purchase at $10 last month)
t$ 0
During month:
sell @ $20, get e$2000 deposited into your e$ account, and $500 into your t$ account for possible reinvesting |
This is where things went wrong. I thought that I needed to track the gains for this month and only give you those funds to reinvest; it turns out that the entire proceeds from the sale are available to reinvest or the math doesn't work. So ultimately it is a simpler solution.
| Quote: | | You only got e$500 in profits from your last transaction, so you are increasing your portfolio baseline by e$500. Your new baseline for return % is e$2000. At that exact moment you have t$ 0, baseline of e$2000, and a profit of e$500. You have diluted your return, it drops from 33% to 25%. This is expected. Why? Because you had to add more cash to your t$ to make the trade. |
And this will not be true, the return should stay at 33% for this scenario because you spent less than you got out of the prior return. Note that there is a difference between "profitted" and "got out of" as far as the dollars. You "made" $500 profit this month, that will be accumulated as a gain for the month. But you have e$2000 to reinvest before you need to add to your portfolio basis for the month.
| Quote: | | Compare this to a scenario where the entire transaction takes place in a single month. You start the month with zero, buy a stock at 15 and sell at 20. Your baseline is 1500, your t$ are 2000. What is your return? 25%. If you reinvest 1000 and the stock is exactly where you purchased it, you still have a 25% return. |
As stated earlier, this should be a 33% return. And since the prior scenario has been adjusted (corrected) then both investors have the same return, which is good because they have the same net profit for the month on the same portfolio value.
I'm trying to see now if - since I only need to know the net sale proceeds - I even need the t$ account, or if I can simply derive all of the values I need from the existing data. Once that decision is made coding will commence. I'll keep you posted. |
|
| Back to top |
|
 |
| Trading Simulator |
Posted: Mon Apr 03, 2006 3:44 am Post subject: |
|
|
Investing Sr. Associate

|
One important scenario that I have not covered yet... investing new money. This will reduce your portfolio return %.
Example: Buy 100 shares @ $10 for an investment of e$1000
That stock rises to $15, giving you a percentage of 50%. You leave that money in, but feel that the investment has a lot further to go so you invest another e$1500 to buy 100 more shares. What is your return?
It drops to 20%. Your baseline is now e$2500 and your profit is still (currently) e$500. Going forward you now own 200 shares, and your profits will increase at double the monetary value.
The same thing happens when you average into a down position. You cut your losses and reduce your % loss.
Scenario:
Buy 100 @ 10 (e$1000)
It drops to $5 for a -50% return
Buy 500 @ $5 (e$2500)
New portfolio baseline = 1000 + 2500 = 3500
Portfolio loss = -500
New return -14.3%
When the stock recovers to $6 you have a e$400 loss on your first purchase and an e$500 gain on the second purchase resulting in a net of + 100 on a basis of 3500 for a return of 2.85% return. |
|
| Back to top |
|
 |
|
|