ArturSepp / QuantInvestStrats

Quantitative Investment Strategies (QIS) package implements Python analytics for visualisation of financial data, performance reporting, analysis of quantitative strategies.

Home Page:https://github.com/ArturSepp/QuantInvestStrats

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

data Freq=ME is not implemented

PortReal opened this issue · comments

Hi,

i am trying to use you work but there seams to be an issue with the freq. I am getting the following error:

[\site-packages\qis\utils\dates.py:517 FutureWarning: 'M' is deprecated and will be removed in a future version, please use 'ME' instead.
return pd.bdate_range(start=time_period.start,
TypeError: freq=ME is not impelemnted

Could you help ?

Hi PortReal,
This error was caused by using pandas version => 2.0.0 in which freq parameters 'M', 'Q', 'A' are depreciated.
Now qis package is transitioned for pandas => 2.0.0. The following freq parameters are replaced: 'M' -> 'ME', 'Q' - > 'QE', 'A' -> 'YE'
The requirements file is updated accordingly

Hi ArthurSepp,

Thanks! Much appreciated!

And by the way. Great job with the script. Do you have any thoughts on your default setups with regards to regression and so on? I am intending to use some of you work with my own price/return series. Also do you intend to implement the Brinson Fachler attribution model?

Thank you for your kind feedback.
I added the Brinson attribution report:
i) implementation in qis.portfolio.reports.brinson_attribution.py
ii) plotting functionality in factsheet report qis.portfolio.reports.strategy_benchmark_factsheet.py
iii) example plot in qis.examples.factsheets.strategy_benchmark.py

Most of regressions are defaulted to using monthly returns
There is always ways to pass concrete params based on the used-case
I always think I need to spend more time on documentation :)
Feel free to contribute and let me know if you have any questions.

Hi,
Cool you have implemented it.

I just have a bit of pain figurering out how to use it i for my case. I want to look at the Brinson model for an Equity fond of fond portfolio. So i am having 8 external manageres where each manager have their own Benchmark. Then the sum of all the portfolios/manageres is the total Equity Portfolio with MSCI World as total index for the total portfolio. I have all the data but cant figure out how to implement it in the current setup in qis. it is rather concussing with the multi_portfolio_data Class and the vol_target on the volatility parity portfolio.

Hi,
In my setting I apply Brinson-Fachler attribution as a cross-check of a strategy performance against a simpleer equal allocation ot the like strategy.
For your setting you need to apply Brinson-Fachler attribution to each portfolio individually. Your goal is to select managers with skills in either with asset selection or security selection (or both). Each os the managers have their own benchmark.
To apply one yardstick, I suggest you use MSCI World as the single benchmark for each manager. Then you can compare their Brinson-Fachler attribution.
In addition to looking at the averages, I advice to check the time series of selection alphas (as implemeted in qis package): a strong alpha is consistent throuch different periods and accrues roughly linearly in time.

Hi,
Thanks.

Could you please point me in the direction of the selection alphas in qis? I cant finde it..

You could run factsheet generation for several assets in
in qis.examples.factsheets.multi_assets.py (see also 2. Multi assets factsheet in README.md)
This factsheet is adopted to compare a few strategies/funds relative to the benchmark.
It displays the cumulative alpha: the Jensen alpha of the performance unexplained by beta exposuures.
The ra (risk-adjusted) table also displays the beta and annualised alpha relative to the benchmark
It also displays the decomposition of the Sharpe ratio by benchmark regimes, the returns conditional on the volatility of the benchmark for measure the sensitivity of the benchmark regimes.
I use this factsheet for my day-to-day analyses. It is very easy to adopt it to your applications and the risk/performance metrics you would like to display.