Fordham-PortfolioEffect Algo Trading Workshop with Python, NYC

NYC, Sunday, May 21st from 9am to 4pm

During the workshop, you will learn how to compute intraday risk with PortfolioEffect HFT package available on Anaconda. The complexity of tick market data will be explained. You will study how to build your own portfolio, create a strategy, backtest it, optimize it, and use vol forecasting.


Beginner knowledge of Python and finance, college level math and laptop

We will learn how to use Jupyter Notebook.



9:00 AM – 9:30 AM: Welcome

9:30 AM – 10:00 AM: Introduction to tick market data

10:00 AM – 10:30 AM: Intraday risk metrics

10:30 AM – 11:00 AM: Exercise

11:00 AM – 11:30 AM: Backtesting & build your strategies

11:30 AM – 12:00 PM: Exercise with a moving average strategy

12:00 PM – 1:00 PM: Lunch break

1:00 PM – 1:30 PM: Vol forecasting

1:30 PM – 2:00 PM: Exercise on vol forecasting

2:00 PM – 2:30 PM: Break

2:30 PM – 3:00 PM: Portfolio optimization

3:00 PM – 3:30 PM: Exercise

3:30 PM – 3:45 PM: Strategies

3:45 PM – 4:00 PM: Closing remarks



Fordham Quantitative Finance Society

To register click here.

BZ Awards Finalist

We are happy to be part of BZ awards finalist. Thanks for voting for us!

Clean tick market data to get real time portfolio analytics, optimization and forecasting have never been so important to understands better the market.

At PortfolioEffect, we take care for you of the tick market data challenges so you can just focus on building the winning strategy that produce the most alpha.

Tick market data challenges solved by PortfolioEffect:

  • Microstructure Noise Model
  • Non Gaussian Returns Model
  • Price Jumps & Outliers Model
  • Portfolio Factors Model
  • Fractal Time Scaling Model
  • Spot Sensitivity Model

Jupyter Notebook, Python or R Kernel & PortfolioEffect HFT Package

Using Jupyter notebook to develop strategies, do research or monitor your portfolio is a great idea.  Jupyter supports different languages.

At PortfolioEffect, our users are currently using R or Python kernel. They directly login through our web browser to see their portfolios. Examples on how to develop strategies and monitor risks are provided.

This solution is great for institutional that use R or Python &  Academics who do research or teach a class. No installation to do, all is done for you. You just need to login and do your work.

Contact if you want more information.


You can see below an example of Jupyter notebook:


Princeton R Workshop



Princeton-PortfolioEffect Algo Trading Workshop

Sunday, April 9th from 9:00 am – 4:30 pm

Princeton, NJ

We are glad to announce that this year we are partnering with Quant Trading Conference to deliver an R Workshop.


Beginner knowledge of R and finance, college level math with RStudio installed


9:00 AM          9:30 AM          Welcome

9:30 AM          10:00 AM        Introduction to high frequency market data

10:00 AM        10:30 AM        Intraday risk metrics

10:30 AM        11:00 AM        Exercise

11:00 AM        11:30 AM        Backtesting portfolio and build your own strategies

11:30 AM        12:00 PM         Exercise on backtesting with a moving average strategy

12:00 PM         1:00 PM           Lunch break

1:00 PM           1:30 PM           Vol forecasting

1:30 PM           2:00 PM           Exercise on vol forecasting

2:00 PM           2:30 PM           Break

2:30 PM           3:00 PM           Portfolio optimization

3:00 PM           3:30 PM           Exercise

3:30 PM           4:00 PM           Strategies

4:00 PM           4:15 PM           Closing remarks


Andrey Kostin, PhD & Stephanie Toper
For any questions, email


Registration: Click here, space is limited

PortfolioEffect Utilizes Real-Time Risk Metrics To Create Alpha

Benzinga’s article on PorftolioEffect can be found on this link. We decided to post the article in the blog as it is a good description of what we do.

You can vote for PortfolioEffect here on Facebook and Linkedin for 2 votes.

PortfolioEffect Utilizes Real-Time Risk Metrics To Create Alpha

PortfolioEffect Utilizes Real-Time Risk Metrics To Create Alpha

It’s almost that time of year.

The 2017 Benzinga Global Fintech Awards is a competition to showcase the companies with the most impressive technology that are paving the future in financial services and capital markets.
To get you prepared for this year’s awards, Benzinga will profile each fintech company that has applied. Want to get involved? Submit your company here. For this installment, we spoke with PortfolioEffect Director Stephanie Toper (answers have been edited for length and clarity).


What does your company do? What unique problem does it solve?

Toper: PortfolioEffect provides a unique platform to compute real time risk metrics, optimize, backtest and forecast. All our computations are using tick market data. It means if you have a news event or a flash crash, you risk metrics should indicate you right away what is happening and you can react accordingly. Imagine if you had to wait the end of day numbers to be able to rebalance your portfolio accordingly, it might be too late.

It’s powerful tool to develop your strategy and create alpha. We have some of the strategy examples on our website or blog.

  • 40+ portfolio metrics (VaR, ETL, alpha, beta, Sharpe ratio, Omega ratio, etc.)
  • Supports R, Matlab, Java & Python
  • 10+ portfolio optimizations
  • 8k+ market tick data sources since 2012 (stocks, indices & ETFs traded on NASDAQ). Clients can also upload their own market data (e.g.: Chinese stocks).

Who are your customers?

Toper: Our main customers are hedge funds, asset managers and single users. We have two main products right now:

  • Our user friendly platform that you can access through 4 APIs: Python, Matlab, Java and R
  • Two databases that we sell through Quandl (Vol&Risk Factors, Risk&Performance Metrics)
  • Coming up: Forecasted Vol databases end of day (today,1D,1W) & Intra-day (now, 15min, 30min). If some people are interested, let us know and we can keep you up updated when they are live.

How long have you been in business?

Toper: We have been in business for about five years. At first, we had a long research phase to be able to compute real time risk as this topic is still under research of a lot of academics. Product is now ready to use. We are currently the selling and partnering phase.

I used to work in different front office positions. I noticed that a lot of institutions are not able to provide intra-day risk, which could be very frustrating as a trader where knowing alpha, beta, vol of your portfolio is crucial to understand the complexity of the market or develop accurate strategy.

Being able to deal with tick market data is the future.

Is there anything else Benzinga should know about your company?

Toper: We are working with different partners to integrate our real time risks to their platforms. If you want to become partners, contact us.

Moving Average Strategy using hft Python package

Package Installation

For hft package installation, you will need to have Anaconda2 and JDK installed. Please take a look at the manual.

conda install -c portfolioeffect hft

Strategy description

We use price vector to create a strategy based on moving average. We assume
that prices tend to revert to its moving average. Therefore, if the prices are
below its moving average, we get into the position by 1 unit. If prices are above
the moving average, we are out of position. The window length of the moving
average is 150 seconds.

  • ˆ if stock price<MA(price, N-second) => buy 1 share
  • ˆ if stock price>MA(price, N-second) => out of position

Using 3 stocks :

  • ˆ Dr. Reddy’s Laboratories Ltd (RDY)
  • ˆ ICICI Bank Limited (IBN)
  • ˆ Tata Motors Ltd Tata Motors Limited (TTM)





Expected Return


Value at Risk

Implementation of the strategy using hft Python package

 dateStart = "t-7"
 dateEnd = "t"
 portfolio = Portfolio(fromTime=dateStart, toTime=dateEnd)
 for symbol in symbols:
    portfolioTemp = Portfolio(fromTime=dateStart, toTime=dateEnd)
    position = portfolioTemp.add_position(symbol, 1)
    price = compute(position.price())[0]
    price_value = np.asarray(price[1])
    print_time = price[0]
    strategy = np.asarray([0] * len(price_value))
    price_value_MA = np.asarray(MA(price_value, 150))
    strategy[price_value < price_value_MA] = 100
    position = portfolio.add_position(symbol=symbol, quantity=strategy.tolist(),



Webinar: Alpha Generation

Webinar Date and Time

Tuesday, January 10, 2017

8:30 PM IST | 9.00 AM CST

Alpha Generation

Asset returns based on low frequency prices (e.g. end-of-day quotes) are still dominating modern portfolio analysis. To make portfolio metrics more relevant intraday and improve the precision of estimates, new data frequency needs to be explored.

In this presentation we demonstrate how using high frequency market data for portfolio risk management and optimization could improve the classic variance-bias trade-off and bring new insights to strategy backtesting.

Since high frequency prices require special handling, we discuss key components of an automatic model pipeline for microstructure noise, price jumps, outliers, fat tails and long-memory.

We conclude our presentation with an introduction to high frequency portfolio optimization built on top of intraday portfolio metrics. Examples will be shown in Python.

About PortfolioEffect

PortfolioEffect service offers portfolio optimization, portfolio backtesting, metrics forecasting and intraday risk metrics through 4 APIs: Python, R, Matlab and Java. The uniqueness of our service is that all calculation are done using high frequency market data which benefits low and high frequency traders. We cover 8,000+ US Equities (stocks, indices, ETFs). Clients can also upload their own market data. PortfolioEffect service employs latest advances in high frequency market microstructure theory to make classic portfolio risk and optimization results available intraday at tick-level resolution. It uses automated model pipeline to process high frequency price returns in a streaming fashion.

Who should attend?

This webinar will be very beneficial for those who need intraday risk metrics at any frequency, portfolio optimization, portfolio backtesting and metrics forecasting. Example will be shown in Python. The session will be ideal for:

  • Researchers
  • Quant Analysts
  • Traders on Equities, ETF and Indices
  • Those who are looking for backtesting strategies
  • Python coders interested in financial markets

To register click here.


Strategy: Selecting the Best End of Day Sharpe Ratio

At PortfolioE ffect, we use high frequency market data to calculate intraday or end of
day risk metrics. This involves a new methodology for the calculation of risk that was
developed through 5 years of research. The results benefi ts low and high frequency
traders and researchers. We off er risk metrics data on volatility and risk factors for
8,000+ fi nancial instruments, including stocks, stock indices and ETFs. Our end of day
risk metrics data are available on Quandl: Vol & Risk FactorsRisk & Performance Metrics.

To illustrate the potential utility of our data, we have built a sample algorithm that uses
it. Using the end of day Sharpe ratio calculated by PortfolioEff ect, we compare the end
of day Sharpe ratio for the last day to the Sharpe ratio for a 1 week window length on 10
stocks: ‘IBM’,’GOOG’,’C’,’F’,’GM’,’GE’,’AAPL’,’AMZN’,’CSCO’,’GS’ since 01/04/2013.
By 1 week window length, it means the window length for calculating the metric is 1
week. Weekly Sharpe ratio is calculated on 5 days windows length. Therefore, we look
at the Sharpe ratio of the daily vs weekly rate. If the daily Sharpe ratio is greater than
the weekly Sharpe ratio, we take a long position, otherwise a short one. At each step of
the algo, we buy and sell. For example, we have 8 shares to buy and 2 shares to sale, we
buy each share with a quantity of 150% / 8 = 18.75% and sell up to 50% / 2 = 25% of
the portfolio. We are creating a changing portfolio containing long and short positions
at any given time.

In summary, we buy stocks with good Sharpe ratio through the sale of shares with
poor Sharpe ratio. Take a look at the attached backtest.


For more info on our end of day risk datasets, see attached description.