Sunday, August 9, 2015

get the fed-wind at your back with sdi_corLabel - correlation percent in a chart label. (thinkscript included)

'don't fight the fed' is the watch-phrase of wallstreet. but, how do you know if your investment is fighting the fed? the fed controls the inter-bank overnight loan rate which forms a low-bound on interest rates overall. when this rate is changed all the other interest rates tend to change in lockstep. of particular influence on stocks is the ten-year treasury yield which forms the basis of home mortgage rates (e.g. 10 year treasury yield + 2 pts is a common recipe for a mortgage quote.) so it behooves one to know how ones investments are affected by interest rates, which can be understood by the correlation to the tnx 10-year treasury index. here's the picture: 

Sunday, August 2, 2015

souping thinkorswim: purge your simtrades

if you have discovered the tos analyze tab then you undoubtedly have created simtrades for analysis. these simtrades don't go away until you delete them and they consume considerable resources in the java heap. here's how to search and destroy these resource 'suckers':

go to the analyze tab. then blank out any entry in the symbol text entry box.  this will cause the positions and simulated trades section to show everything. then click on the expand all dropdown panels button which has an icon that looks like multiple overlapping triangles. here's what this should look like:


analyze tab showing all positions and simulated trades expanded
then scroll through the list and delete all the simtrades that you don't need anymore, especially those that were for options that have expired which will be highlighted in red. alternatively, you can click on the show actions menu button, adjacent to the expand all dropdown panels button, and select delete simulated trades as a shortcut if you are relatively sure there aren't any simtrades you want to keep.

when i deleted about a score or so of my old simtrades i got back several hundred megabytes of memory. besides recovering memory, eliminating these forgotten objects speeds up the garbage collector because it then has fewer live objects in its list to evaluate.