portfolio.C File Reference

#include "Riostream.h"
#include "TCanvas.h"
#include "TFile.h"
#include "TMath.h"
#include "TTree.h"
#include "TArrayF.h"
#include "TH1.h"
#include "TF1.h"
#include "TLegend.h"
#include "TSystem.h"
#include "TMatrixD.h"
#include "TMatrixDSym.h"
#include "TVectorD.h"
#include "TQpProbDens.h"
#include "TGondzioSolver.h"

Go to the source code of this file.

Classes

class  TStockDaily

Functions

Double_t RiskProfile (Double_t *x, Double_t *par)
TArrayFStockReturn (TFile *f, const TString &name, Int_t sDay, Int_t eDay)
TVectorD OptimalInvest (Double_t riskFactor, TVectorD r, TMatrixDSym Covar)
void portfolio ()

Variables

const Int_t nrStocks = 10
static const Char_tstocks []


Function Documentation

TVectorD OptimalInvest ( Double_t  riskFactor,
TVectorD  r,
TMatrixDSym  Covar 
)

Definition at line 180 of file portfolio.C.

References A, b, C, c, TQpVar::fX, TQpProbDens::MakeData(), TQpProbDens::MakeResiduals(), TQpProbDens::MakeVariables(), nrStocks, ROOT::Math::Cephes::Q, and s.

Referenced by portfolio().

void portfolio (  ) 

Definition at line 269 of file portfolio.C.

References TSystem::AccessPathName(), TLegend::AddEntry(), c1, TCanvas::cd(), data, TPad::Divide(), TF2::Draw(), TF1::Draw(), TH1::Draw(), TLegend::Draw(), f2, TH2::Fill(), Form(), TF1::GetHistogram(), gPad, gSystem, h1, h2, i, j, k, nrStocks, TFile::Open(), OptimalInvest(), RiskProfile(), TH1::SetBarOffset(), TH1::SetBarWidth(), TAttFill::SetFillColor(), TAttLine::SetLineColor(), TH1::SetMaximum(), TH1::SetMinimum(), TFormula::SetParameter(), TH1::SetStats(), TH1::SetXTitle(), TH1::SetYTitle(), TMath::Sqrt(), StockReturn(), and stocks.

Double_t RiskProfile ( Double_t x,
Double_t par 
)

Definition at line 138 of file portfolio.C.

References TMath::Exp().

Referenced by portfolio().

TArrayF& StockReturn ( TFile f,
const TString name,
Int_t  sDay,
Int_t  eDay 
)

Definition at line 144 of file portfolio.C.

References TArrayF::AddAt(), data, TTree::GetBranch(), TTree::GetEntries(), TBranch::GetEntry(), i, name, and TTree::SetBranchAddress().

Referenced by portfolio().


Variable Documentation

const Int_t nrStocks = 10

Definition at line 115 of file portfolio.C.

Referenced by OptimalInvest(), and portfolio().

const Char_t* stocks[] [static]

Initial value:

     {"GE","SUNW","QCOM","BRCM","TYC","IBM","AMAT","C","PFE","HD"}

Definition at line 116 of file portfolio.C.

Referenced by portfolio().


Generated on Tue Jul 5 16:09:36 2011 for ROOT_528-00b_version by  doxygen 1.5.1