Hi, guys.

I am wondering if there's a way to optimized for long term capital gain because I'm trading on personal account, not a hedge fund entity.

Ex.  if I predict a down turn and I have 1000 shares, and only 500 is eligible for long term capital gain, I would only sell the the loss ones + 500 shares.

I'm wondering what's the best way to do this and if it is possible to query the holdings and get the number of share that's hold for more than 12 months.

Thanks!