[ts-gen] Handling commissions and fees
kfmfe04 at gmail.com
Wed Sep 16 12:28:41 EDT 2009
When I first read this, I got a bitter taste in my mouth - fees are so
basic, but they don't seem to be accessible. But after thinking about
it somewhat, I think your suggestion may be the only way to go. The
problem with the 3/7/7 solution posted seems to be, not only is it a
sum of realized p & l plus commissions, but also, I think because it
only seems to show up when I query for acct, it seems to include all
the trades that occurred during some unspecified time period (one
day?) - or is it the last trade?
What I may have to do is, calculate my expected fees, and insert that
value into MySQL and then, as a part of daily reconciliation run the
Reports Management under "Activity Flex" as you mentioned, and keep
reworking my code until I can get the two sides to match without
What's worse is, I can't build this software until I start trading for
real - there are no reports for paper accounts - the best I can do is
calculated an expected_fee and then reconcile this value later...
I wish there was a better way - anyone else with ideas or descriptions
of how you deal with detecting your fees from upstream?
I wonder how TWS itself does it...
On 9/16/09, Michael Gruen <gruenm at gmail.com> wrote:
> Understanding that I'm veering a bit off the question, I just wanted to
> mention a suggestion: IB makes available a configurable web service in
> Reports Management, under "Activity Flex", where you can set up reports with
> custom fields, including one for the exact commission charged on executed
> I use a small Python routine that periodically fetches the generated report
> (instructions are in Account Management on how to use a generated security
> token, etc).
> Again, I understand that it would be optimal to get it through TWS, but for
> reconciliation purposes this may help to automate the process somewhat.
> Mike Gruen
> On Wed, Sep 16, 2009 at 09:47, Ken Feng <kfmfe04 at gmail.com> wrote:
>> Hi Russ,
>> Well, my "simple view" is that when I click on the Trades button in
>> TWS, I see rows with trades with the commission at the end. All I
>> want is that commission column for a given row!
>> Somehow, TWS is able to calculate and/or receive the information from
>> the upstream - I, too, would like to have that number, for
>> reconciliation purposes.
>> - Ken
>> ts-general mailing list
>> ts-general at trading-shim.org
More information about the ts-general