Topic: Graph of ticker with buy/sell marked, to learn from your mistakes

Think of this as an enhancement to the "relative performance" type of graphs:

I often have wished I could visualize my trades on a stock price graph, basically an overlay of a stock price graph that shows when I opened and closed a position in a certain stock.

I think this would be a helpful learning tool, basically to evaluate in retrospect whether the timing of the open/close (buy/sell or shortsell/cover) was good or not so good.

In terms of of implementation, I think a simple 2-color graph similar to the Charts menu (relative performance menu), but the benchmark curve should be the stock itself, just restricted in time to the holding period deduced from the transaction database.

There is of course the added complication that one might have multiple, time-overlapping transactions. I guess multiple colors and markers might solve this, plus some logic to pair buy/sell transactions.

Then there is the possibility of selling half your position, then what, and so on. Yeah, it can get a bit  complicated of it is going to handle all possible cases.

This feature is on the top of my list of  never-seen-elsewhere features.

By the way, I read about Icarra2 on Barry Ritholtz "The Big Picture" blog, that's how I arrived here.

2 (edited by jus7tme 2012-01-24 12:35:08)

Re: Graph of ticker with buy/sell marked, to learn from your mistakes

OOPS: I see you already have ALMOST what I wished for.Great. I see green and red markers that indicate open/closel dates and prices.

The only thing missing is that the time span of the graph does not extend outside the open/close days, even if I select 10 years timespan (for example). So I guess what I am asking for is the ability to see any timespan I want.

Also, if I have multiple non-overlapping positions in one stock, the graph only shows the last pair of trades.

Re: Graph of ticker with buy/sell marked, to learn from your mistakes

Can you double check that it does not show multiple green (buy) and red (sell) arrows?  If you select "Position Inception" for the period you should see all buys and sells.  The only exception may be if the transactions are on the same date or on very close dates in which case it may be difficult to differentiate the arrows.

I will update the transactions chart to show the full time period.  This does not make sense in other charts so they will stay the same.  For example, why would you chart the total value of a position before you own it?

Jesse

4 (edited by jus7tme 2012-01-25 17:48:17)

Re: Graph of ticker with buy/sell marked, to learn from your mistakes

I have checked:

If there are two transactions then the leftmost of the four expected triangles (arrows) do not show. So that is a bug. Maybe will improve when the graphs gets wider from the other feature we talked about (full time period feature)?

I also found out, while mucking around with transactions $/share, that once the $ sign gets into the form, it has to be manually removed before Total will recalculate. I think this behavior is vaguely related to the LC_MONETARY stuff we talked about, but a separate bug so I will post that under bugs.

Is there a newer version than 0.6.1 coming out with the the fixes you did the last few days? That would be great.

Re: Graph of ticker with buy/sell marked, to learn from your mistakes

I still can't replicate this issue.  Would you mind telling me what the transactions are and including a screenshot?  You can email me directly if you don't want to make the data public.

I plan to do an interim release this weekend since several bugs have been fixed.  It will not be an official release but it will fix several bugs for many users.

6 (edited by jus7tme 2012-01-27 09:17:29)

Re: Graph of ticker with buy/sell marked, to learn from your mistakes

I'll try to do this later today, would it work if I sent you the relevant .db file along with the screenshot? (or a link to a download, it is about 1.5MB it looks like).

The transactions are just test cases anyway so I don't mind sharing.


EDIT:

I'll be damned: I quit and restarted icarra2.py and the leftmost and previously missing arrow/triangle now appears on the graph. I think this is the 2nd time I have a bug that appears and then disappears.  Could have something to do with the size of the graph window? I hope you believe me, I have after all posted some provably real bugs  :-).

Do you still want the db to check?

Re: Graph of ticker with buy/sell marked, to learn from your mistakes

Absolutely.  The .db file would be the most useful thing to send me.