help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

rtndecomp


From: Vic Norton
Subject: rtndecomp
Date: Sat, 16 Jun 2012 09:12:28 -0400

This may or may not be appropriate to the Octave Help list.

I recently posted an Octave function on arXiv.org. Here is the
announcement:

   \\
   arXiv:1206.2333
   Date: Mon, 11 Jun 2012 19:42:38 GMT   (162kb,AD)

   Title: An algorithm for the orthogonal decomposition of financial
          return data
   Authors: Vic Norton
   Categories: q-fin.PM q-fin.CP
   \\
   We present an algorithm for the decomposition of periodic financial
   return data into orthogonal factors of expected return and
   "systemic", "productive", and "nonproductive" risk. Generally, when
   the number of funds does not exceed the number of periods, the
   expected return of a portfolio is an affine function of its
   productive risk.
   \\ ( http://arxiv.org/abs/1206.2333 ,  162kb)


Most of the paper is about the derivation and use of the 'rtndecomp'
algorithm. The actual Octave function 'rtndecomp.m' is can be downloaded
from the arXiv site as an ancillary file.

Here is the documentation for the function:

#   Function: [E, F, f0, e0, eF] = rtndecomp(rtns, wgts, pput)
#---------------------------------------------------------------
#   Purpose
#     To decompose financial return data into orthogonal
#     "systemic", "productive", and "nonproductive"
#     risk-factors.
#   Input
#     rtns   - M by n matrix of periodic returns.
#     wgts   - M by 1 vector of positive weights or a scalar,
#              default: wgts = ones(M, 1) / M if wgts is a
#              scalar or rtns is the only input.
#     pput   - periods per unit time. default: pput = 1.
#              example: pput = 252 market-days/year.
#   Output
#     E      - 1 by n matrix of expected returns.
#     F      - m by n matrix of risk coefficients.
#              rank(F) = m unless F = zeros(1, n).
#     f0     - systemic risk (nonnegative).
#     e0     - systemic expected return.
#     eF     - return per unit change in the F(1, :)-direction.
#              (eF >= 0)
#   Global output 
#     eflag  - true iff the constant return vector, ones(M, 1),
#              parallels the returns flat or, said another way,
#                 ones(M, 1) = rtns * x
#              for some n-vector x with sum(x) = 0.
#   Variables and relationships
#     The 1 x n expected return matrix is
#       E = (wgts * pput)' * rtns.
#     The n x n covariance of return matrix is
#       V = Z' * diag(wgts * pput) * Z,
#     where Z is the M x n matrix of risk vectors
#       Z = rtns - ones(M, 1) * E / pput.
#     The output variables satisfy
#       1)  V = f0^2 + F' * F.
#       2)  E = e0 + eF * F(1, :) unless eflag is true;
#           then this relationship is approximate. However
#           mean(E) = mean(e0 + eF * F(1, :)) is always true.
#           We refer to norm(F(1, :)) as the productive risk
#           when eF is nonzero.
#       3)  The row norms,
#             tau(i) = norm(F(i, :)) (i = i0, .., m),
#           are the principal nonproductive risks, where
#             i0 = 2 if eF > 0, and i0 = 1 if eF = 0.
#           The nonproductive risks tau(i) decrease with
#           increasing i, and the corresponding row vectors
#           are pairwise orthogonal:
#             F(i, :)' * F(j, :) = 0 (i0 <= i < j <= m).
#
#---------------------------------------------------------------
#  Copyright (C) 2012  Vic Norton <mailto:address@hidden>
#
#  This GNU Octave program
#           http://www.gnu.org/software/octave/
#  is free software: you can redistribute it and/or modify it
#  under the terms of the GNU General Public License
#           http://www.gnu.org/copyleft/gpl.html
#  as published by the Free Software Foundation
#           http://www.fsf.org/
#  
#  This program is distributed in the hope that it will be
#  useful, but WITHOUT ANY WARRANTY; without even the implied
#  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
#  PURPOSE.  See the GNU General Public License for more
#  details.
#---------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]