Pages: << 1 2 3 4 5 6 7 8 9 >>


Permalink 01:39:46 pm, by Dana Comolli Email , 700 words   English (US)
Categories: Futures Trading, Backoffice

Customized Trade Files

One aspect of trading managed accounts which can cause a CTA endless headaches is the production of end of day trade files to the various administrators and back offices that are associated with the accounts.

Each organization has their own “standard” file layout and unique requirements for both the file and how the information is to be transmitted.  Add to that symbology and decimal point requirements and the situation can quickly get out of hand.

TheBooks has a robust trade reporting facility which allows the end user to define file layouts and data transmission methods allowing the complete automation of this important operational function.

Here is a quick tutorial to get you started.

The Problem

You have just been given an allocation from a large fund of funds and they have specified that you must provide them a trade file at the end of each day that includes all trades done in their account.  The file is to be sent via sFTP, use CQG symbology, and indicate trade changes from prior days by including correction, cancellation, and new indicators within the file.

The Solution

To set this up in TheBooks, you must do three things:

  1. Define a contact that represents the Fund of Funds and specify the sFTP information to use when sending files to the organization
  2. Define the file layout for the file to be sent
  3. Associate the account(s) in TheBooks to the contact specifying the file layout defined in step two and indicating the frequency the data is to be sent.

Define the contact

Contacts are defined using the Configuration -> Counter Parties option.  From there, you add a new contact, then using the FTP tab on the contact property sheet, define the sFTP information as shown below:

sFTP properties

Configure the file

File layouts are also configured using the Configuration -> Counter Party option.  Clicking on the Outbound Data Formats folder on the left portion of the window displays a list of available formats.  We will be defining a new format, but to make things easy, we’ll start with an existing one as a model.

Selecting the item called “Default Activity Summary Format” and clicking on the Clone button on the toolbar causes TheBooks to create a new file layout using the selected layout as a model:

Custom Data Format

Given the requirements for the file, a few changes to the default settings are required:

  • Both the Action and AllocationRowID columns should be added to the file layout.  This is done by selecting the columns in the left hand list of columns and clicking the include button.
  • CQG should be selected in the Translate Market Symbols using this source combo box.
  • The TranslatedMarketSymbol column should be added to the file because this is the name of the column that contains the CQG version of your market symbol.

The Action column causes TheBooks to generate CANCEL/CORRECT/NEW items in the file enabling trade changes to be reflected in the file and the AllocationRowID column provides a unique number that the receiver of the file can use to associate changes to the trades.

Once this has been done, give the file layout a name and the click OK to create it.

Associate the account

The last step in the process is to link the account with the contact.  This is also accomplished using the Configuration -> Counter Party option.  Click on the folder called Contacts that receive trading activity and click on the New button.

Select the contact and account from the dropdowns, select the Notify options to Daily, send a CSV via FTP in the new format you just defined and click OK.

 Interested Party Definition

That’s all there is to it.  Now, at end of day, the client will automatically receive a data file of trades sent via sFTP containing activity for their account.  Any changes to prior-reported trades will be noted within the file and the market symbols will be CQG symbols rather than the symbology you use.


Providing customized trade files to investors, clearing brokers, 3rd party administrators, and others can be a daunting task for a CTA with managed accounts.  For users of TheBooks, providing these types of files, customized to each recipient, is accomplished using a few, simple, configuration tasks.


Permalink 10:29:33 am, by Dana Comolli Email , 1058 words   English (US)
Categories: Futures Trading, Backoffice, Marketing, Data Access

Using Excel to access TheBooks data

TheBooks automatically summarizes a wide range of trading and performance data in formats that are easily accessible to users of common office application such as Microsoft Access and Excel. TheBooks comes with a number of examples of how to access this data using its programming interface.

In this topic, I will show you how to use Excel to access data from TheBooks without any programming at all.


Microsoft Excel has the ability to retrieve data directly from SQL Server databases without the need for any programming. TheBooks uses SQL Server as its database and maintains a number of what are known as Views which contain summarized data for use by other applications. Examples of the types of data available from these views are 13-column performance data and performance attribution by instrument.

The process you follow to retrieve data from TheBooks’ database into Excel is:

  1. Define a Data Source which tells Excel where the data is located
  2. Define a Query which tells Excel what data to retrieve
  3. Define what to do with the data once you have retrieved it

The example shown below uses Excel from Office 2007.

Define a Data Source

A data source provides a link to TheBooks database. Once you have defined a data source, you can use it for multiple queries.

First, select the Data tab and select From Microsoft Query from the From Other Sources option.

Begin defining a database

If this is the first time you are defining a query, you will need to create the data source. In the future, you can skip the next few steps and select the data source you previously created. Since this is the first time, we will choose to create a new data source.

Create a new data source

By clicking on OK, the SQL Server logon dialog is displayed. Clicking on the Options> button will expand the window and show the dialog below. In this example, the server is called g2\sql2005_x32 and TheBooks database is called Demo. Your server name will most likely be different and your database will probably be called TheBooks. I have selected to use Trusted Connections which means that my windows logon will be used to access the database. You may have to specify a username and password if your IT organization requires. See them for details.

SQL Server Login dialog

Clicking OK will save the definition and open the dialog shown below. You should give the data source an easily understandable name so you can reference it later. You should select the SQL Server Native Client 10.0 driver from the list of database drivers. Finally, select the default table for the data source. In our example, I am choosing the view that returns trading returns by instrument, converted to USD. For detailed descriptions of available view, see TheBooks documentation.

Create new data source

Now that the data source has been created, you can select it for use in the query to return data. Remember, if you have already created a data source, you do not have to do it again; skip the previous steps and simply select the data source you previously created to begin the definition of the query.

Select the data source

Define your Query

You start building your query by indicating the types of database objects you want to work with. You should always select only Views since TheBooks pre-defines these for the most common types of data you would want to report on.

Table Options

Clicking on OK brings up the Query Wizard. Scroll the list of available tables and columns to select the view you want to work with. Then, add the columns you want to return to Excel.

Query Wizard - Choose Columns

Once you have selected the columns you want to include, click on Next>. This brings you to the filter options. These options allow you to filter the data that is returned. In this example, I am restricting the data returned to only that for 2009.

Query Wizard - Filter Data

Clicking on Next> brings up the sort order options. This controls how the data is returned to Excel. You can select as many columns as you like and specify the sort order for each.

Query Wizard - Sort Order

Clicking Next> brings you to the Save Query dialog. This allows you to save the query you just build for use later. This is useful if you want to retrieve the same data and use it for another report or chart.

Query Wizard - Choose Columns

Working with the Data

Now that you have defined the query, you now must decide what to have Excel do with the data that is returned. In our example, I am going create a pivot table and also include a chart of the data.

Query Wizard - Choose Columns

Clicking on OK causes Excel to retrieve the data and insert it into your spreadsheet. If you are accessing a large amount of data, this may take some time. Excel provides an indication of its progress in the lower right of the window by showing how many records have been processed.

Excel data loading progress

Since I selected a pivot table, Excel displays the pivot table designer once the data has been retrieved.

Pivot Table Designer

To add columns to the pivot table, simply select them from the list on the right. Excel does a good job of deciding if the column should be a value or a row label but you can drag them to where you want them for your report in the lower right section of the screen.

Pivot Table

The data in the table is a daily detail of instrument returns by sector. If I want to have it summarized by month so I can easily graph it, I need to have Excel group the trade date by month. This is done by selecting the Group option from the Option tab.

Group Pivot Table Data

Group Pivot Table Data Prompt

This gives me the ability to group by month and expand or contract the data as I see fit.

Group By Month Pivot Table Data

Because I also asked Excel to include a chart, whatever I have included in the pivot table is automatically incorporated into a chart. The data in the chart is displayed at the same grouping and summary level as that displayed in the pivot table. I have selected stacked bars for my chart style so I can show monthly income and show what comprises each month’s income.

Charted Pivot Table Data


I have shown how easy it is to produce custom reports and charts from within Excel by retrieving the summary data produced by TheBooks. This data can be brought into Excel and manipulated without any programming experience by using capabilities provided by Excel and TheBooks.


Permalink 09:30:13 am, by Dana Comolli Email , 301 words   English (US)
Categories: Futures Trading, Backoffice, Marketing

Tear Sheets made easy

All advisors create a monthly Tear Sheet describing their program, its performance in the prior month, as well as the performance since inception.  The document also includes a number of statistics and typically contains comparisons of the advisor’s program with one or more benchmarks.

Many advisors find the development of these documents tedious at best and the thought of producing them in the first week of the month unthinkable.

For users of TheBooks, the process is fully automated since TheBooks includes a monthly summary template which automates the production of this critical piece of marketing documentation.  Because the data comes directly from TheBooks, the document can be produced as early in the month as desired.

CTA Monthly Summary Tear Sheer

The author of the tear sheet works in the familiar Microsoft Word environment and has a wide range of document parts to work with. Since the tool is Word, document layout, fonts, colors, and chart appearance are all under the control of the author. TheBooks simply fills in the data as required.

The template provides the following document parts for the author to include in the document:

  • Sector Returns Chart
  • Program Statistics Table
  • Monthly Performance Table
  • VAMI/Assets Chart
  • Returns Distribution Chart
  • Benchmark Comparison Chart
  • Monthly Performance Comparison Chart

Where do the benchmarks come from?

TheBooks includes the eight industry-wide Barclay indices and allows you to include user-defined benchmarks. User-defined benchmarks are defined within TheBooks using the Data Manager. Once defined, TheBooks automatically obtains the data and makes it available for reporting and comparison purposes.


As a CTA, you must create a program tear sheet on a monthly basis.  For users of TheBooks, the process of creating this important piece of marketing material is greatly simplified through the use of provided templates, the immediate access to performance data, and the availability of standard and CTA-specific benchmarks.

<< 1 2 3 4 5 6 7 8 9 >>

September 2020
Mon Tue Wed Thu Fri Sat Sun
 << <   > >>
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30        
The official blog for users and others interested in TheBooks®


XML Feeds

powered by b2evolution free blog software