YTD performance and new charts

Greetings,



I have noticed the increase in social media on the website, which is great. Please let me know if you need any assistance in regards to social media, I as I have a black belt in twitter programing.



Moving on… Two issues. 1. I pull down my charts and place them on my website, is there new code for the new charts. I looked briefly I was unable to extract so I could place it on my charts, like I have done in the past.



2. Instead of calculating to the YTD performance myself, I decided to save myself the headache and it is easier for me to scrape the annual return (compounded) from the website. Primarily, I felt if I calculated it then it would never exactly match what was on the C2 website, hence defeating the purpose of a third party verifier. Now that you have added the “twitter/Facebook would you like to tell someone feature” I do see that you are calculating annual return and not annual return compounded. When is it possible is possible to scrape this number or acquire this number. The reason being, my YTD performance is 20% while my YTD performance (compounded) is 30%. Since the 30% is not the number I want to scrape, but it’s the only one I have to provide to customers.



Thanks



Chad

I think the internet term is “bump”? That’s polite way of asking for a response.

Hi, Chad:



Thanks for the gentle bump.



1) While there’s no way to pull the new charts onto your web site (since they are generated on the client side using Javascript, which requires a bunch of overhead), you can still draw pretty charts using the old format. These appear as plain old PNG images. Data is always updated and fresh. Access these charts like so:



<img src=“http://www.collective2.com/cgi-perl/syscharts.mpl?systemid=65626984”>



where the systemid is, of course, your own system’s id.



2) I’m not sure you can easily scrape the stats from HTML. But currently, you can access all stats via our Data Services API. I think your suggestion is a good one, though, and I will talk to some folks around here about possibly providing an alternate way for enterprising web masters to access the needed data. My first thought was a javascript function, but I am not sure that will be acceptable to modern notions of browser security. (Might appear as cross-site scripting.) So let me think about it. I can’t give any sort of timeframe for a solution, so if this is very important to you, please consider at least investigating the Data Services API.



Matthew

Hi it looks like charts and returns on C2 are calculated on rolling prices, rather than actual trades, is that right? There are several FX providers, if you track prices when they opened and closed positions, the C2 graph and returns show a loss but they closed the trade in profit. (Strawberry Rhubarb has a few of these).

Hi, Mark:



Yes, this is called marked-to-market accounting, and is really the standard way P/L reporting is done (and the way that regulators here in the U.S.A. and Europe insist on its being done). In short, you must track a trade’s open profit and loss even while the trade is still open. You mark the trade “to market” – that is, you value the position at the market rate – over time. You do not wait for the trade to be closed in order to mark it on your balance sheet.



Matthew