We're going to evaluate portfolio performance. The common way to do this is to estimate a portfolio's return adjusted for risk using a factor model with tradeable risk factors.
What's a risk factor? These risk factors are portfolios and the idea is that the expected excess return on these risk factors is compensation to investors for bearing the risk inherent in holding those portfolios. For the return variation in these factors to be "risky", it should be something that investors cannot easily diversify. If it was easy to diversify, then investors could put a small bit of the asset in their portfolio and capture the return without affecting portfolio volatility. That would imply being able to increase return without adding risk. Hence the requirement that a factor constitute return variation that is hard to diversify away.
The greater the riskiness of the factor, the greater the factor's expected return (i.e., the risk-return tradeoff). For example, most people feel that stocks are riskier than bonds and indeed stocks have historically had higher returns than bonds.
The risk adjustment involves estimating a portfolio's \(\beta\)'s on different risk factors. These \(\beta\)'s constitute the exposure of the portfolio to the risk factor. If the factor return goes up by 1%, then the portfolio's return goes up by \(\beta \times 1\%\).
We can estimate these \(\beta\)'s by OLS regressions of the portfolio's returns on contemporaneous returns of the risk factors. The slope coefficients on the risk factors are the portfolio's betas on the risk factors. The regression intercept is known as \(\alpha\). It represents the average return of the portfolio that is not explained by the portfolio's \(\beta\)'s on the risk factors. This alpha is the risk-adjusted return.
Intuitively, \(\alpha\) is the average return on a portfolio long the investment you are evaluating and short a portfolio with the same factor risk as that portfolio. If the factors and factor betas accurately measure the portfolio's risk, then the alpha is the portfolio's return that is unrelated to the portfolio's risk. Investors like positive alphas because that implies that the portfolio's return is higher than what investors require for bearing the portfolio's risk.
One thing to keep in mind is that throughout this discussion, we have discussed things from the perspective of arbitrage. That is, like a trader. We have not made any assumptions about utility functions or return distributions. This is the Arbitrage Pricing Theory (APT) of Stephen Ross (1976). He was motivated by the observation that
"... on theoretical grounds it is difficult to justify either the assumption [in mean-variance anlysis and CAPM] of normality in returns...or of quadratic preferences...and on empirical grounds the conclusions as well as the assumptions of the theory have also come under attack."
The APT way of thinking is less restrictive than economically motivated equilibrium asset pricing models. Which is nice. But it has the cost that it does not tell us as much. With the APT we cannot say precisely what a security's return should be. We can only say that if we go long a portfolio and short the portfolio that replicates its factor exposure, then the alpha shouldn't be too big. But if we're thinking like a trader, that's perhaps most of what we care about anyway.
#r "nuget: FSharp.Stats, 0.5.0"
#r "nuget: FSharp.Data, 5.0.2"
#r "nuget: Plotly.NET, 3.*"
#r "nuget: Plotly.NET.Interactive, 3.*"
#r "nuget: NovaSBE.Finance, 0.5.0"
#r "nuget: Quotes.YahooFinance, 0.0.5"
open System
open FSharp.Data
open Quotes.YahooFinance
open FSharp.Stats
open Plotly.NET
open NovaSBE.Finance
open NovaSBE.Finance.Ols
Environment.CurrentDirectory <- __SOURCE_DIRECTORY__
We get the Fama-French 3-Factor asset pricing model data.
let ff3 = French.getFF3 French.Frequency.Monthly
Let's get a portfolio to analyze.
VBR is the Vanguard Small Cap Value ETF. It invests in small-cap value stocks.
type Return = { YearMonth: DateTime; Return: float }
let getReturns (ticker: string) =
YahooFinance.History(
ticker,
startDate = DateTime(2010, 1, 1),
endDate = DateTime(DateTime.Now.Year - 1, 12, 31),
interval = Monthly
)
|> List.sortBy (fun x -> x.Date)
|> List.pairwise
|> List.map (fun (yesterday, today) ->
{ YearMonth = DateTime(today.Date.Year, today.Date.Month, 1)
Return = today.AdjustedClose / yesterday.AdjustedClose - 1.0 })
|> List.toArray
let vbr = getReturns "VBR"
We'll also use VTI as a proxy for the market later.
let vti = getReturns "VTI"
A function to accumulate simple returns.
let cumulativeReturn (xs: seq<DateTime * float>) =
let mutable cr = 1.0
[ for (dt, r) in xs do
cr <- cr * (1.0 + r)
dt, cr - 1.0 ]
Plot of vbr cumulative return.
let vbrChart =
vbr
|> Array.map (fun x -> x.YearMonth, x.Return)
|> cumulativeReturn
|> Chart.Line
You want to work with excess returns. If you have a zero-cost, long-short portfolio then it is already an excess return. But if you have a long portfolio such as we have with VBR, we need to convert it to an excess return.
type ExcessReturn =
{ YearMonth: DateTime
ExcessReturn: float }
// ff3 indexed by month
let ff3ByMonth =
ff3 |> Array.map (fun x -> DateTime(x.Date.Year, x.Date.Month, 1), x) |> Map
let vbrExcess =
vbr
|> Array.map (fun x ->
{ YearMonth = x.YearMonth
ExcessReturn = x.Return - ff3ByMonth[x.YearMonth].Rf })
let vtiExcess =
vti
|> Array.map (fun x ->
{ YearMonth = x.YearMonth
ExcessReturn = x.Return - ff3ByMonth[x.YearMonth].Rf })
For regression, it is helpful to have the portfolio
return data merged into our factor model data.
type RegData =
{
Date: DateTime
/// Make sure Portfolio is an Excess Return
Portfolio: float
MktRf: float
Hml: float
Smb: float
}
let regData =
vbrExcess
|> Array.map (fun x ->
let xff3 = ff3ByMonth[x.YearMonth]
{ Date = x.YearMonth
Portfolio = x.ExcessReturn
MktRf = xff3.MktRf
Hml = xff3.Hml
Smb = xff3.Smb })
One way to evaluate performance is Sharpe ratios.
/// Calculates sharpe ratio of a sequence of excess returns
let sharpe (xs: float seq) = (Seq.mean xs) / (Seq.stDev xs)
let annualizeMonthlySharpe monthlySharpe = sqrt (12.0) * monthlySharpe
Our portfolio.
regData |> Array.map (fun x -> x.Portfolio) |> sharpe |> annualizeMonthlySharpe
The market.
regData |> Array.map (fun x -> x.MktRf) |> sharpe |> annualizeMonthlySharpe
The HML factor.
regData |> Array.map (fun x -> x.Hml) |> sharpe |> annualizeMonthlySharpe
Now we can estimate our factor models using OLS.
let capmEstimate = Ols("Portfolio ~ MktRf", regData).fit()
let ff3Estimate = Ols("Portfolio ~ MktRf + Hml + Smb", regData).fit()
CAPM results.
capmEstimate.summary ()
- What's the interpretation of the alpha?
- What's the interpretation of the beta?
- If you want to replicate VBR with the MKT factor and risk-free bonds, what are the weights that you would use?
Fama-French 3-Factor model results
ff3Estimate.summary ()
- What's the interpretation of the alpha?
- What's the interpretation of the factor betas?
- If you want to replicate VBR with risk free bonds and the MKT, HML, and SMB factors, what are the weights that you would use?
Practice: What is the expected annual return of VBR? When answering this,
- Assume that your alpha and beta estimates for the 3 factor model explaining VBR returns are accurate.
- Use the average annual premia on the Fama and French factors from 1926 until end of 2022 as your estimate of the factors' expected returns.
// Answer here
You will probably see that the CAPM \(R^2\) is lower than the
Fama-French \(R^2\). This means that you can explain more of the
portfolio's returns with the Fama-French model. Or in trader terms,
you can hedge the portfolio better with the multi-factor model.
Let's turn things around and see if we can explain the HML factor.
let hmlRegData =
let vbrByMonth = vbrExcess |> Array.map (fun x -> x.YearMonth, x) |> Map
[| for vti in vtiExcess do
{| YearMonth = vti.YearMonth
Hml = ff3ByMonth[vti.YearMonth].Hml
Vti = vti.ExcessReturn
Vbr = vbrByMonth[vti.YearMonth].ExcessReturn |} |]
hmlRegData[..3]
Explain the HML factor with VTI and VBR
let hmlModel = Ols("Hml ~ Vti + Vbr", hmlRegData).fit()
hmlModel.summary()
- What's the interpretation of the alpha?
- What's the interpretation of the betas?
- If you want to replicate HML using VTI, VBR, and risk-free bonds, what are the weights you would use?
Note:
HML average return.
hmlRegData |> Array.averageBy (fun x -> 12.0 * x.Hml)
VTI average return
hmlRegData |> Array.averageBy (fun x -> 12.0 * x.Vti)
VBR average return.
hmlRegData |> Array.averageBy (fun x -> 12.0 * x.Vbr)
We want residuals so that we can estimate information ratios.
let capmResiduals = capmEstimate.resid
let ff3Residuals = ff3Estimate.resid
In general I would write a function to do this. Function makes it a bit
simpler to follow. It's hard for me to read the next few lines and understand
what everything is. Too much going on.
let capmAlpha = 12.0 * capmEstimate.coefs["Intercept"]
let capmStDevResiduals = sqrt (12.0) * (Seq.stDev capmResiduals)
let capmInformationRatio = capmAlpha / capmStDevResiduals
val capmAlpha: float = -0.03043829182
val capmStDevResiduals: float = 0.07553316546
val capmInformationRatio: float = -0.4029791634
|
let ff3Alpha = 12.0 * ff3Estimate.coefs["Intercept"]
let ff3StDevResiduals = sqrt (12.0) * (Seq.stDev ff3Residuals)
let ff3InformationRatio = ff3Alpha / ff3StDevResiduals
val ff3Alpha: float = -0.008830715608
val ff3StDevResiduals: float = 0.03868132804
val ff3InformationRatio: float = -0.228294013
|
Here is the function version.
let informationRatio monthlyAlpha (monthlyResiduals: float array) =
let annualAlpha = 12.0 * monthlyAlpha
let annualStDev = sqrt (12.0) * (Seq.stDev monthlyResiduals)
annualAlpha / annualStDev
informationRatio capmEstimate.coefs["Intercept"] capmResiduals
val informationRatio:
monthlyAlpha: float -> monthlyResiduals: float array -> float
val it: float = -0.4029791634
|
informationRatio ff3Estimate.coefs["Intercept"] ff3Residuals
val it: float = -0.228294013
|
namespace System
Multiple items
namespace FSharp
--------------------
namespace Microsoft.FSharp
Multiple items
namespace FSharp.Data
--------------------
namespace Microsoft.FSharp.Data
namespace Quotes
namespace Quotes.YahooFinance
namespace FSharp.Stats
namespace Plotly
namespace Plotly.NET
namespace NovaSBE
namespace NovaSBE.Finance
module Ols
from NovaSBE.Finance
type Environment =
static member Exit: exitCode: int -> unit
static member ExpandEnvironmentVariables: name: string -> string
static member FailFast: message: string -> unit + 1 overload
static member GetCommandLineArgs: unit -> string array
static member GetEnvironmentVariable: variable: string -> string + 1 overload
static member GetEnvironmentVariables: unit -> IDictionary + 1 overload
static member GetFolderPath: folder: SpecialFolder -> string + 1 overload
static member GetLogicalDrives: unit -> string array
static member SetEnvironmentVariable: variable: string * value: string -> unit + 1 overload
static member CommandLine: string
...
<summary>Provides information about, and means to manipulate, the current environment and platform. This class cannot be inherited.</summary>
property Environment.CurrentDirectory: string with get, set
<summary>Gets or sets the fully qualified path of the current working directory.</summary>
<exception cref="T:System.ArgumentException">Attempted to set to an empty string ("").</exception>
<exception cref="T:System.ArgumentNullException">Attempted to set to <see langword="null" />.</exception>
<exception cref="T:System.IO.IOException">An I/O error occurred.</exception>
<exception cref="T:System.IO.DirectoryNotFoundException">Attempted to set a local path that cannot be found.</exception>
<exception cref="T:System.Security.SecurityException">The caller does not have the appropriate permission.</exception>
<returns>The directory path.</returns>
val ff3: French.FF3Obs array
module French
from NovaSBE.Finance
val getFF3: frequency: French.Frequency -> French.FF3Obs array
type Frequency =
| Daily
| Monthly
union case French.Frequency.Monthly: French.Frequency
type Return =
{
YearMonth: DateTime
Return: float
}
Multiple items
[<Struct>]
type DateTime =
new: year: int * month: int * day: int -> unit + 16 overloads
member Add: value: TimeSpan -> DateTime
member AddDays: value: float -> DateTime
member AddHours: value: float -> DateTime
member AddMicroseconds: value: float -> DateTime
member AddMilliseconds: value: float -> DateTime
member AddMinutes: value: float -> DateTime
member AddMonths: months: int -> DateTime
member AddSeconds: value: float -> DateTime
member AddTicks: value: int64 -> DateTime
...
<summary>Represents an instant in time, typically expressed as a date and time of day.</summary>
--------------------
DateTime ()
(+0 other overloads)
DateTime(ticks: int64) : DateTime
(+0 other overloads)
DateTime(ticks: int64, kind: DateTimeKind) : DateTime
(+0 other overloads)
DateTime(date: DateOnly, time: TimeOnly) : DateTime
(+0 other overloads)
DateTime(year: int, month: int, day: int) : DateTime
(+0 other overloads)
DateTime(date: DateOnly, time: TimeOnly, kind: DateTimeKind) : DateTime
(+0 other overloads)
DateTime(year: int, month: int, day: int, calendar: Globalization.Calendar) : DateTime
(+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int) : DateTime
(+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, kind: DateTimeKind) : DateTime
(+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, calendar: Globalization.Calendar) : DateTime
(+0 other overloads)
Multiple items
val float: value: 'T -> float (requires member op_Explicit)
--------------------
type float = Double
--------------------
type float<'Measure> =
float
val getReturns: ticker: string -> Return array
val ticker: string
Multiple items
val string: value: 'T -> string
--------------------
type string = String
type YahooFinance =
static member Dividends: symbols: string list * ?startDate: DateTime * ?endDate: DateTime * ?interval: Interval * ?displayLogs: bool -> Dividend list
static member History: symbol: string * ?startDate: DateTime * ?endDate: DateTime * ?interval: Interval * ?displayLogs: bool -> Quote list + 1 overload
static member Meta: symbols: string list * ?startDate: DateTime * ?endDate: DateTime * ?interval: Interval * ?displayLogs: bool -> Meta list
static member YahooFinance.History: symbols: string seq * ?startDate: DateTime * ?endDate: DateTime * ?interval: Interval * ?displayLogs: bool -> Quote list
static member YahooFinance.History: symbol: string * ?startDate: DateTime * ?endDate: DateTime * ?interval: Interval * ?displayLogs: bool -> Quote list
property DateTime.Now: DateTime with get
<summary>Gets a <see cref="T:System.DateTime" /> object that is set to the current date and time on this computer, expressed as the local time.</summary>
<returns>An object whose value is the current local date and time.</returns>
property DateTime.Year: int with get
<summary>Gets the year component of the date represented by this instance.</summary>
<returns>The year, between 1 and 9999.</returns>
union case Interval.Monthly: Interval
Multiple items
module List
from FSharp.Stats
<summary>
Module to compute common statistical measure on list
</summary>
--------------------
module List
from Microsoft.FSharp.Collections
--------------------
type List =
new: unit -> List
static member geomspace: start: float * stop: float * num: int * ?IncludeEndpoint: bool -> float list
static member linspace: start: float * stop: float * num: int * ?IncludeEndpoint: bool -> float list
--------------------
type List<'T> =
| op_Nil
| op_ColonColon of Head: 'T * Tail: 'T list
interface IReadOnlyList<'T>
interface IReadOnlyCollection<'T>
interface IEnumerable
interface IEnumerable<'T>
member GetReverseIndex: rank: int * offset: int -> int
member GetSlice: startIndex: int option * endIndex: int option -> 'T list
static member Cons: head: 'T * tail: 'T list -> 'T list
member Head: 'T
member IsEmpty: bool
member Item: index: int -> 'T with get
...
--------------------
new: unit -> List
val sortBy: projection: ('T -> 'Key) -> list: 'T list -> 'T list (requires comparison)
val x: Quote
Quote.Date: DateTime
val pairwise: list: 'T list -> ('T * 'T) list
val map: mapping: ('T -> 'U) -> list: 'T list -> 'U list
val yesterday: Quote
val today: Quote
property DateTime.Month: int with get
<summary>Gets the month component of the date represented by this instance.</summary>
<returns>The month component, expressed as a value between 1 and 12.</returns>
Quote.AdjustedClose: float
<summary>
Split and dividend adjusted Close price
</summary>
val toArray: list: 'T list -> 'T array
val vbr: Return array
val vti: Return array
val cumulativeReturn: xs: (DateTime * float) seq -> (DateTime * float) list
val xs: (DateTime * float) seq
Multiple items
val seq: sequence: 'T seq -> 'T seq
--------------------
type 'T seq = Collections.Generic.IEnumerable<'T>
val mutable cr: float
val dt: DateTime
val r: float
val vbrChart: GenericChart.GenericChart
Multiple items
type Array =
new: unit -> Array
static member geomspace: start: float * stop: float * num: int * ?IncludeEndpoint: bool -> float array
static member linspace: start: float * stop: float * num: int * ?IncludeEndpoint: bool -> float array
--------------------
new: unit -> Array
val map: mapping: ('T -> 'U) -> array: 'T array -> 'U array
val x: Return
Return.YearMonth: DateTime
Return.Return: float
type Chart =
static member AnnotatedHeatmap: zData: #('a1 seq) seq * annotationText: #(string seq) seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Name: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?ShowLegend: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?Opacity: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?X: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?XGap: int * [<Optional; DefaultParameterValue ((null :> obj))>] ?Y: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?YGap: int * [<Optional; DefaultParameterValue ((null :> obj))>] ?Text: 'a5 * [<Optional; DefaultParameterValue ((null :> obj))>] ?MultiText: 'a5 seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?ColorBar: ColorBar * [<Optional; DefaultParameterValue ((null :> obj))>] ?ColorScale: Colorscale * [<Optional; DefaultParameterValue ((null :> obj))>] ?ShowScale: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?ReverseScale: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?ZSmooth: SmoothAlg * [<Optional; DefaultParameterValue ((null :> obj))>] ?Transpose: bool * [<Optional; DefaultParameterValue ((false :> obj))>] ?UseWebGL: bool * [<Optional; DefaultParameterValue ((false :> obj))>] ?ReverseYAxis: bool * [<Optional; DefaultParameterValue ((true :> obj))>] ?UseDefaults: bool -> GenericChart (requires 'a1 :> IConvertible and 'a5 :> IConvertible) + 1 overload
static member Area: x: #IConvertible seq * y: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?ShowMarkers: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?Name: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?ShowLegend: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?Opacity: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?MultiOpacity: float seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Text: 'a2 * [<Optional; DefaultParameterValue ((null :> obj))>] ?MultiText: 'a2 seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?TextPosition: TextPosition * [<Optional; DefaultParameterValue ((null :> obj))>] ?MultiTextPosition: TextPosition seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?MarkerColor: Color * [<Optional; DefaultParameterValue ((null :> obj))>] ?MarkerColorScale: Colorscale * [<Optional; DefaultParameterValue ((null :> obj))>] ?MarkerOutline: Line * [<Optional; DefaultParameterValue ((null :> obj))>] ?MarkerSymbol: MarkerSymbol * [<Optional; DefaultParameterValue ((null :> obj))>] ?MultiMarkerSymbol: MarkerSymbol seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Marker: Marker * [<Optional; DefaultParameterValue ((null :> obj))>] ?LineColor: Color * [<Optional; DefaultParameterValue ((null :> obj))>] ?LineColorScale: Colorscale * [<Optional; DefaultParameterValue ((null :> obj))>] ?LineWidth: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?LineDash: DrawingStyle * [<Optional; DefaultParameterValue ((null :> obj))>] ?Line: Line * [<Optional; DefaultParameterValue ((null :> obj))>] ?StackGroup: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?Orientation: Orientation * [<Optional; DefaultParameterValue ((null :> obj))>] ?GroupNorm: GroupNorm * [<Optional; DefaultParameterValue ((null :> obj))>] ?FillColor: Color * [<Optional; DefaultParameterValue ((false :> obj))>] ?UseWebGL: bool * [<Optional; DefaultParameterValue ((true :> obj))>] ?UseDefaults: bool -> GenericChart (requires 'a2 :> IConvertible) + 1 overload
static member Bar: values: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Keys: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Name: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?ShowLegend: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?Opacity: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?MultiOpacity: float seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Text: 'a2 * [<Optional; DefaultParameterValue ((null :> obj))>] ?MultiText: 'a2 seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?MarkerColor: Color * [<Optional; DefaultParameterValue ((null :> obj))>] ?MarkerColorScale: Colorscale * [<Optional; DefaultParameterValue ((null :> obj))>] ?MarkerOutline: Line * [<Optional; DefaultParameterValue ((null :> obj))>] ?MarkerPatternShape: PatternShape * [<Optional; DefaultParameterValue ((null :> obj))>] ?MultiMarkerPatternShape: PatternShape seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?MarkerPattern: Pattern * [<Optional; DefaultParameterValue ((null :> obj))>] ?Marker: Marker * [<Optional; DefaultParameterValue ((null :> obj))>] ?Base: #IConvertible * [<Optional; DefaultParameterValue ((null :> obj))>] ?Width: 'a4 * [<Optional; DefaultParameterValue ((null :> obj))>] ?MultiWidth: 'a4 seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?TextPosition: TextPosition * [<Optional; DefaultParameterValue ((null :> obj))>] ?MultiTextPosition: TextPosition seq * [<Optional; DefaultParameterValue ((true :> obj))>] ?UseDefaults: bool -> GenericChart (requires 'a2 :> IConvertible and 'a4 :> IConvertible) + 1 overload
static member BoxPlot: [<Optional; DefaultParameterValue ((null :> obj))>] ?X: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Y: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Name: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?ShowLegend: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?Text: 'a2 * [<Optional; DefaultParameterValue ((null :> obj))>] ?MultiText: 'a2 seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?FillColor: Color * [<Optional; DefaultParameterValue ((null :> obj))>] ?MarkerColor: Color * [<Optional; DefaultParameterValue ((null :> obj))>] ?Marker: Marker * [<Optional; DefaultParameterValue ((null :> obj))>] ?Opacity: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?WhiskerWidth: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?BoxPoints: BoxPoints * [<Optional; DefaultParameterValue ((null :> obj))>] ?BoxMean: BoxMean * [<Optional; DefaultParameterValue ((null :> obj))>] ?Jitter: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?PointPos: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?Orientation: Orientation * [<Optional; DefaultParameterValue ((null :> obj))>] ?OutlineColor: Color * [<Optional; DefaultParameterValue ((null :> obj))>] ?OutlineWidth: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?Outline: Line * [<Optional; DefaultParameterValue ((null :> obj))>] ?AlignmentGroup: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?OffsetGroup: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?Notched: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?NotchWidth: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?QuartileMethod: QuartileMethod * [<Optional; DefaultParameterValue ((true :> obj))>] ?UseDefaults: bool -> GenericChart (requires 'a2 :> IConvertible) + 2 overloads
static member Bubble: x: #IConvertible seq * y: #IConvertible seq * sizes: int seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Name: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?ShowLegend: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?Opacity: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?MultiOpacity: float seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Text: 'a2 * [<Optional; DefaultParameterValue ((null :> obj))>] ?MultiText: 'a2 seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?TextPosition: TextPosition * [<Optional; DefaultParameterValue ((null :> obj))>] ?MultiTextPosition: TextPosition seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?MarkerColor: Color * [<Optional; DefaultParameterValue ((null :> obj))>] ?MarkerColorScale: Colorscale * [<Optional; DefaultParameterValue ((null :> obj))>] ?MarkerOutline: Line * [<Optional; DefaultParameterValue ((null :> obj))>] ?MarkerSymbol: MarkerSymbol * [<Optional; DefaultParameterValue ((null :> obj))>] ?MultiMarkerSymbol: MarkerSymbol seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Marker: Marker * [<Optional; DefaultParameterValue ((null :> obj))>] ?LineColor: Color * [<Optional; DefaultParameterValue ((null :> obj))>] ?LineColorScale: Colorscale * [<Optional; DefaultParameterValue ((null :> obj))>] ?LineWidth: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?LineDash: DrawingStyle * [<Optional; DefaultParameterValue ((null :> obj))>] ?Line: Line * [<Optional; DefaultParameterValue ((null :> obj))>] ?StackGroup: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?Orientation: Orientation * [<Optional; DefaultParameterValue ((null :> obj))>] ?GroupNorm: GroupNorm * [<Optional; DefaultParameterValue ((false :> obj))>] ?UseWebGL: bool * [<Optional; DefaultParameterValue ((true :> obj))>] ?UseDefaults: bool -> GenericChart (requires 'a2 :> IConvertible) + 1 overload
static member Candlestick: ``open`` : #IConvertible seq * high: #IConvertible seq * low: #IConvertible seq * close: #IConvertible seq * x: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Name: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?ShowLegend: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?Opacity: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?Text: 'a5 * [<Optional; DefaultParameterValue ((null :> obj))>] ?MultiText: 'a5 seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Line: Line * [<Optional; DefaultParameterValue ((null :> obj))>] ?IncreasingColor: Color * [<Optional; DefaultParameterValue ((null :> obj))>] ?Increasing: FinanceMarker * [<Optional; DefaultParameterValue ((null :> obj))>] ?DecreasingColor: Color * [<Optional; DefaultParameterValue ((null :> obj))>] ?Decreasing: FinanceMarker * [<Optional; DefaultParameterValue ((null :> obj))>] ?WhiskerWidth: float * [<Optional; DefaultParameterValue ((true :> obj))>] ?UseDefaults: bool -> GenericChart (requires 'a5 :> IConvertible) + 1 overload
static member Column: values: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Keys: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Name: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?ShowLegend: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?Opacity: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?MultiOpacity: float seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Text: 'a2 * [<Optional; DefaultParameterValue ((null :> obj))>] ?MultiText: 'a2 seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?MarkerColor: Color * [<Optional; DefaultParameterValue ((null :> obj))>] ?MarkerColorScale: Colorscale * [<Optional; DefaultParameterValue ((null :> obj))>] ?MarkerOutline: Line * [<Optional; DefaultParameterValue ((null :> obj))>] ?MarkerPatternShape: PatternShape * [<Optional; DefaultParameterValue ((null :> obj))>] ?MultiMarkerPatternShape: PatternShape seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?MarkerPattern: Pattern * [<Optional; DefaultParameterValue ((null :> obj))>] ?Marker: Marker * [<Optional; DefaultParameterValue ((null :> obj))>] ?Base: #IConvertible * [<Optional; DefaultParameterValue ((null :> obj))>] ?Width: 'a4 * [<Optional; DefaultParameterValue ((null :> obj))>] ?MultiWidth: 'a4 seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?TextPosition: TextPosition * [<Optional; DefaultParameterValue ((null :> obj))>] ?MultiTextPosition: TextPosition seq * [<Optional; DefaultParameterValue ((true :> obj))>] ?UseDefaults: bool -> GenericChart (requires 'a2 :> IConvertible and 'a4 :> IConvertible) + 1 overload
static member Contour: zData: #('a1 seq) seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Name: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?ShowLegend: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?Opacity: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?X: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Y: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Text: 'a4 * [<Optional; DefaultParameterValue ((null :> obj))>] ?MultiText: 'a4 seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?ColorBar: ColorBar * [<Optional; DefaultParameterValue ((null :> obj))>] ?ColorScale: Colorscale * [<Optional; DefaultParameterValue ((null :> obj))>] ?ShowScale: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?ReverseScale: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?Transpose: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?ContourLineColor: Color * [<Optional; DefaultParameterValue ((null :> obj))>] ?ContourLineDash: DrawingStyle * [<Optional; DefaultParameterValue ((null :> obj))>] ?ContourLineSmoothing: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?ContourLine: Line * [<Optional; DefaultParameterValue ((null :> obj))>] ?ContoursColoring: ContourColoring * [<Optional; DefaultParameterValue ((null :> obj))>] ?ContoursOperation: ConstraintOperation * [<Optional; DefaultParameterValue ((null :> obj))>] ?ContoursType: ContourType * [<Optional; DefaultParameterValue ((null :> obj))>] ?ShowContourLabels: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?ContourLabelFont: Font * [<Optional; DefaultParameterValue ((null :> obj))>] ?Contours: Contours * [<Optional; DefaultParameterValue ((null :> obj))>] ?FillColor: Color * [<Optional; DefaultParameterValue ((null :> obj))>] ?NContours: int * [<Optional; DefaultParameterValue ((true :> obj))>] ?UseDefaults: bool -> GenericChart (requires 'a1 :> IConvertible and 'a4 :> IConvertible)
static member Funnel: x: #IConvertible seq * y: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Name: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?ShowLegend: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?Opacity: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?Width: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?Offset: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?Text: 'a2 * [<Optional; DefaultParameterValue ((null :> obj))>] ?MultiText: 'a2 seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?TextPosition: TextPosition * [<Optional; DefaultParameterValue ((null :> obj))>] ?MultiTextPosition: TextPosition seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Orientation: Orientation * [<Optional; DefaultParameterValue ((null :> obj))>] ?AlignmentGroup: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?OffsetGroup: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?MarkerColor: Color * [<Optional; DefaultParameterValue ((null :> obj))>] ?MarkerOutline: Line * [<Optional; DefaultParameterValue ((null :> obj))>] ?Marker: Marker * [<Optional; DefaultParameterValue ((null :> obj))>] ?TextInfo: TextInfo * [<Optional; DefaultParameterValue ((null :> obj))>] ?ConnectorLineColor: Color * [<Optional; DefaultParameterValue ((null :> obj))>] ?ConnectorLineStyle: DrawingStyle * [<Optional; DefaultParameterValue ((null :> obj))>] ?ConnectorFillColor: Color * [<Optional; DefaultParameterValue ((null :> obj))>] ?ConnectorLine: Line * [<Optional; DefaultParameterValue ((null :> obj))>] ?Connector: FunnelConnector * [<Optional; DefaultParameterValue ((null :> obj))>] ?InsideTextFont: Font * [<Optional; DefaultParameterValue ((null :> obj))>] ?OutsideTextFont: Font * [<Optional; DefaultParameterValue ((true :> obj))>] ?UseDefaults: bool -> GenericChart (requires 'a2 :> IConvertible)
static member Heatmap: zData: #('a1 seq) seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Name: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?ShowLegend: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?Opacity: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?X: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?XGap: int * [<Optional; DefaultParameterValue ((null :> obj))>] ?Y: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?YGap: int * [<Optional; DefaultParameterValue ((null :> obj))>] ?Text: 'a4 * [<Optional; DefaultParameterValue ((null :> obj))>] ?MultiText: 'a4 seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?ColorBar: ColorBar * [<Optional; DefaultParameterValue ((null :> obj))>] ?ColorScale: Colorscale * [<Optional; DefaultParameterValue ((null :> obj))>] ?ShowScale: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?ReverseScale: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?ZSmooth: SmoothAlg * [<Optional; DefaultParameterValue ((null :> obj))>] ?Transpose: bool * [<Optional; DefaultParameterValue ((false :> obj))>] ?UseWebGL: bool * [<Optional; DefaultParameterValue ((false :> obj))>] ?ReverseYAxis: bool * [<Optional; DefaultParameterValue ((true :> obj))>] ?UseDefaults: bool -> GenericChart (requires 'a1 :> IConvertible and 'a4 :> IConvertible) + 1 overload
...
static member Chart.Line: xy: (#IConvertible * #IConvertible) seq * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?ShowMarkers: bool * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Name: string * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?ShowLegend: bool * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Opacity: float * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?MultiOpacity: float seq * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Text: 'c * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?MultiText: 'c seq * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?TextPosition: StyleParam.TextPosition * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?MultiTextPosition: StyleParam.TextPosition seq * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?MarkerColor: Color * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?MarkerColorScale: StyleParam.Colorscale * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?MarkerOutline: Line * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?MarkerSymbol: StyleParam.MarkerSymbol * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?MultiMarkerSymbol: StyleParam.MarkerSymbol seq * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Marker: TraceObjects.Marker * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?LineColor: Color * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?LineColorScale: StyleParam.Colorscale * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?LineWidth: float * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?LineDash: StyleParam.DrawingStyle * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Line: Line * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?StackGroup: string * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Orientation: StyleParam.Orientation * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?GroupNorm: StyleParam.GroupNorm * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Fill: StyleParam.Fill * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?FillColor: Color * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((false :> obj))>] ?UseWebGL: bool * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((true :> obj))>] ?UseDefaults: bool -> GenericChart.GenericChart (requires 'c :> IConvertible)
static member Chart.Line: x: #IConvertible seq * y: #IConvertible seq * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?ShowMarkers: bool * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Name: string * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?ShowLegend: bool * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Opacity: float * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?MultiOpacity: float seq * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Text: 'a2 * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?MultiText: 'a2 seq * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?TextPosition: StyleParam.TextPosition * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?MultiTextPosition: StyleParam.TextPosition seq * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?MarkerColor: Color * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?MarkerColorScale: StyleParam.Colorscale * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?MarkerOutline: Line * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?MarkerSymbol: StyleParam.MarkerSymbol * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?MultiMarkerSymbol: StyleParam.MarkerSymbol seq * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Marker: TraceObjects.Marker * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?LineColor: Color * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?LineColorScale: StyleParam.Colorscale * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?LineWidth: float * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?LineDash: StyleParam.DrawingStyle * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Line: Line * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?StackGroup: string * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Orientation: StyleParam.Orientation * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?GroupNorm: StyleParam.GroupNorm * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Fill: StyleParam.Fill * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?FillColor: Color * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((false :> obj))>] ?UseWebGL: bool * [<Runtime.InteropServices.Optional; Runtime.InteropServices.DefaultParameterValue ((true :> obj))>] ?UseDefaults: bool -> GenericChart.GenericChart (requires 'a2 :> IConvertible)
module GenericChart
from Plotly.NET
<summary>
Module to represent a GenericChart
</summary>
val toChartHTML: gChart: GenericChart.GenericChart -> string
<summary>
Converts a GenericChart to it HTML representation. The div layer has a default size of 600 if not specified otherwise.
</summary>
type ExcessReturn =
{
YearMonth: DateTime
ExcessReturn: float
}
val ff3ByMonth: Map<DateTime,French.FF3Obs>
val x: French.FF3Obs
French.FF3Obs.Date: DateTime
Multiple items
module Map
from FSharp.Stats
<summary>
Module to strore specialised computations on maps
</summary>
--------------------
module Map
from Microsoft.FSharp.Collections
--------------------
type Map<'Key,'Value (requires comparison)> =
interface IReadOnlyDictionary<'Key,'Value>
interface IReadOnlyCollection<KeyValuePair<'Key,'Value>>
interface IEnumerable
interface IStructuralEquatable
interface IComparable
interface IEnumerable<KeyValuePair<'Key,'Value>>
interface ICollection<KeyValuePair<'Key,'Value>>
interface IDictionary<'Key,'Value>
new: elements: ('Key * 'Value) seq -> Map<'Key,'Value>
member Add: key: 'Key * value: 'Value -> Map<'Key,'Value>
...
--------------------
new: elements: ('Key * 'Value) seq -> Map<'Key,'Value>
val vbrExcess: ExcessReturn array
val vtiExcess: ExcessReturn array
type RegData =
{
Date: DateTime
Portfolio: float
MktRf: float
Hml: float
Smb: float
}
module Portfolio
from NovaSBE.Finance
val regData: RegData array
val x: ExcessReturn
val xff3: French.FF3Obs
ExcessReturn.YearMonth: DateTime
ExcessReturn.ExcessReturn: float
French.FF3Obs.MktRf: float
French.FF3Obs.Hml: float
French.FF3Obs.Smb: float
val sharpe: xs: float seq -> float
Calculates sharpe ratio of a sequence of excess returns
val xs: float seq
Multiple items
module Seq
from FSharp.Stats
<summary>
Module to compute common statistical measure
</summary>
--------------------
module Seq
from Microsoft.FSharp.Collections
--------------------
type Seq =
new: unit -> Seq
static member geomspace: start: float * stop: float * num: int * ?IncludeEndpoint: bool -> float seq
static member linspace: start: float * stop: float * num: int * ?IncludeEndpoint: bool -> float seq
--------------------
new: unit -> Seq
val mean: items: 'T seq -> 'U (requires member (+) and member Zero and member DivideByInt and member (/))
<summary>
Computes the population mean (Normalized by N)
</summary>
<param name="items">The input sequence.</param>
<remarks>Returns default value if data is empty or if any entry is NaN.</remarks>
<returns>population mean (Normalized by N)</returns>
val stDev: items: 'T seq -> 'U (requires member (-) and member Zero and member DivideByInt and member (+) and member ( * ) and member (+) and member (/) and member Sqrt)
<summary>
Computes the sample standard deviation
</summary>
<param name="items">The input sequence.</param>
<remarks>Returns NaN if data is empty or if any entry is NaN.</remarks>
<returns>standard deviation of a sample (Bessel's correction by N-1)</returns>
val annualizeMonthlySharpe: monthlySharpe: float -> float
val monthlySharpe: float
val sqrt: value: 'T -> 'U (requires member Sqrt)
val x: RegData
RegData.Portfolio: float
Make sure Portfolio is an Excess Return
RegData.MktRf: float
RegData.Hml: float
val capmEstimate: RegressionResults
Multiple items
module Ols
from NovaSBE.Finance
--------------------
type Ols<'Record> =
new: formula: string * data: 'Record seq -> Ols<'Record>
member fit: unit -> RegressionResults
member df_model: int
member df_resid: int
member endog_names: string
member exog_names: string array
member k_constant: int
<summary>Create a model from a formula and collection of records</summary>
--------------------
new: formula: string * data: 'Record seq -> Ols<'Record>
val ff3Estimate: RegressionResults
member RegressionResults.summary: ?yname: string * ?xname: string seq * ?title: string * ?alpha: float * ?slim: bool -> string
val hmlRegData: {| Hml: float; Vbr: float; Vti: float; YearMonth: DateTime |} array
val vbrByMonth: Map<DateTime,ExcessReturn>
val vti: ExcessReturn
val hmlModel: RegressionResults
val averageBy: projection: ('T -> 'U) -> array: 'T array -> 'U (requires member (+) and member DivideByInt and member Zero)
val x: {| Hml: float; Vbr: float; Vti: float; YearMonth: DateTime |}
anonymous record field Hml: float
anonymous record field Vti: float
anonymous record field Vbr: float
val capmResiduals: float array
property RegressionResults.resid: float array with get
<summary>
The model residuals
</summary>
val ff3Residuals: float array
val capmAlpha: float
property RegressionResults.coefs: Map<string,float> with get
<summary>
The estimated model coefficients
</summary>
val capmStDevResiduals: float
val capmInformationRatio: float
val ff3Alpha: float
val ff3StDevResiduals: float
val ff3InformationRatio: float
val informationRatio: monthlyAlpha: float -> monthlyResiduals: float array -> float
val monthlyAlpha: float
val monthlyResiduals: float array
type 'T array = 'T array
val annualAlpha: float
val annualStDev: float