Wealth-Lab Wiki

API ChartStyles Community Components Community Indicators IndexDefinitions Knowledge Base Misc Optimizers Pending Deletion PosSizers Providers Standard Indicators TASC Traders Tips TASCIndicators Tutorial Videos Visualizers
RSS

Navigation


Quick Search
»
Advanced Search »


Beta: Indicator Documentation

Syntax


public Beta(Bars bars, Bars index, int period)

Parameter Description

bars Primary Bars object
index The Bars object for your index symbol
period Lookback period

Description

According to definition at Investopedia, beta coefficient is a measure of the volatility (risk) of a security or a portfolio in comparison to the market as a whole.

Here we are using ^GSPC symbol of the S&P500 Index, suitable for Yahoo! data. Look in the code below for the Fidelity data symbol.

Example


using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using WealthLab;
using WealthLab.Indicators;
using Community.Indicators;

namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { Beta beta = Beta.Series( Bars, GetExternalSymbol("^GSPC",true),200); // Yahoo symbol //Beta beta = Beta.Series( Bars, GetExternalSymbol(".SPX",true),200); // Fidelity symbol ChartPane betatest = CreatePane( 30, true, true ); PlotSeries( betatest, beta, Color.DarkMagenta, LineStyle.Solid, 2 ); } } }

Important Disclaimer: The information provided by Wealth-Lab is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security.  The owner of Wealth-Lab.com assumes no liability resulting from the use of the material contained herein for investment purposes. By using this web site, you agree to the terms of this disclaimer and our Terms of Use.

Used under license from FMR Corp. Copyright 2008 FMR Corp. All rights reserved.


ScrewTurn Wiki. Some of the icons created by FamFamFam.