Working with EDFs – Part 2

by | Oct 29, 2018 | All Articles, Technical Analysis, Education

In my previous blog post we went over a few examples of how EDFs could be used throughout Optuma. This week I want to show you how EDFs can be used to setup your own mini Portfolio Manager.

For those of you who have been around Optuma for as long as I have, you may recall back in Market Analyst 6 days we had a Portfolio Manager incorporated into the software. As we began to develop Market Analyst 7, and after consultation with our clients, we found most people weren’t using the module, but relying on automated systems that had started to become commonplace with most online brokerage platforms. We decided to redirect our development resources to new projects, such as Scripting.

However there are times where it can be quite handy to have a basic portfolio setup to reference within Optuma as you are performing your analysis. This is another area where EDFs can be used, by converting a Watchlist into a simple Portfolio Manager, with columns for buy price and quantity, and a scripted column generating Profit / Loss values.

The initial setup for the Buy Price and Quantity EDFs is identical to the process I covered in the blog post last week, so I won’t repeat each item here. If you need a refresher you can view that blog post here:

Once you have added the new EDF columns you can enter in your Buy Price and Quantity information:

You can use scripting to generate a new column to display your Profit / Loss details.

The script I used to generate the Profit Loss column in this example was:

V1 = DATAFIELD(FEED=UD, FIELD=Buy_Price) ;
V2 = DATAFIELD(FEED=UD, FIELD=Quantity) ;
PurchasePrice = V1 * V2 ;
CurrentValue = V2 * CLOSE() ;
ProfitLoss = CurrentValue – PurchasePrice ;
ProfitLoss

You can display Profit / Loss as a percentage as well using the same EDF values with a small adjustment to the script:

V1 = DATAFIELD(FEED=UD, FIELD=Buy_Price) ;
V2 = DATAFIELD(FEED=UD, FIELD=Quantity) ;
PurchasePrice = V1 * V2 ;
CurrentValue = V2 * CLOSE() ;
(CurrentValue / PurchasePrice) – 1

When you’re setting this up be sure to set the column in the Watchlist to display as a percentage to get the best results.

You can also use the new Watchlist Custom Labels feature here to make the Profits easier to distinguish from the losses by having values greater than zero show with a green background, and values less than zero display with a red background.

As new data comes in each day, the Profit Loss column will update automatically in the Watchlist.

The above example covers basic items you would include in a Portfolio, however you can expand on this using EDFs to add additional items for Brokerage, etc.

Setting up Watchlist Summary Headers

Once you have the Watchlist setup you can add a header row to the top, which can include summary values.

To add a summary row, right-click on the first row (below the header) and select Insert Header Row, and give it a name (like My Portfolio Totals).

You can now right-click on the newly added header and setup totals to display for various columns:

For the Portfolio you would mostly be using Sum or Average summary values.

This is a fantastic way of being able to quickly gauge the overall performance of your portfolio while in Optuma.

Alternatively if you prefer you can break up your Portfolio into multiple groups (by sector for example) and review performance on a more refined basis.

This is especially useful if you are wanting to evaluate sector specific movements occuring within your current holdings.

Share Link

Matthew Humphreys

Matthew Humphreys

Client Services & Product Director

Matt Humphreys is the Product Manager at Optuma. Starting out in the Customer Service section with 1st level support, he now has over 10 year's experience in assisting traders with technical issues. This has given him a unique perspective on what is needed to streamline computer systems to maximise the benefits that technology can provide.

1 Comment

  1. How do I change this to get Daily Weighted Change? i.e. how my weighted portfolio is doing right now?

    I’ve created the script ‘Weighted Change’ = CHANGE() * DATAFIELD(FEED=UD, FIELD=Quantity), but I can’t get it to show up as an option to add as a column even though the script seems correct. Is there a limitation here? Thanks.

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Blog Signup

Recent Posts

Pin It on Pinterest

Share This

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close