Regression analysis code/ad in for Access

Discussion in 'Access VBA Modules' started by Michael, Jun 23, 2004.

  1. Michael

    Michael Guest

    Does anyone know of the location of a good access
    procedure or ad-in for linear regression analysis (I don't
    mind paying if its is only abailable commercially)

    Michael, Jun 23, 2004
    1. Advertisements

  2. Michael

    John Vinson Guest

    Look for "Total Access Statistics" at I haven't
    used it but some of my friends and clients swear by it.
    John Vinson, Jun 23, 2004
    1. Advertisements

  3. Michael

    Michael Guest

    Thanks John I haven't
    Michael, Jun 24, 2004
  4. Michael

    GreySky Guest

    You can locate the formulas required for linear regression, and convert those to formulas required.

    I had to do this here (I work for a major investment institution) in order to calculate betas (i.e., how closely a portfolio tracks its benchmark) and correlation coefficients (this one's even more fun). It's by no means rocket science; rather, being able to read a little math-geek (aka calculus) and converting it to a relevant expression.

    Beta: (Sum([q].[Benchmark]*[q].[Composite])-Sum([q].[Benchmark])*Sum([q].[Composite])/Count(*))/(Sum([q].[Benchmark]*[q].[Benchmark])-Sum([q].[Benchmark])*Sum([q].[Benchmark])/Count(*))

    This Beta is a linear regression. The inputs are Benchmark returns and Composite returns. If I have x movement in the benchmark, how much movement do I get in comparison in my portfolio? That's a beta. Take my [Benchmark] and [Composite] fields and substitute them for your values you are attempting to regress against linearly.

    In case you care to see correlation of coefficients:

    r: ((Sum([a].[Gross]*.[Gross])-Sum([a].[Gross])*Sum(.[Gross])/Count(*)))/(Sqr(CDbl(nz((Sum([a].[Gross]*[a].[Gross])-Sum([a].[Gross])*Sum([a].[Gross])/Count(*))*(Sum(.[Gross]*.[Gross])-Sum(.[Gross])*Sum(.[Gross])/Count(*))))))

    In this case, take two distinct gross returns (before fees applied to the investment returns), as identified by [a] and . How well do these correlate? This is interesting in terms of comparing differing investment products to see how the returns compare on a period-by-period basis.

    David Atkins, MCP
    GreySky, Jun 26, 2004
  5. Michael


    Informatics Outsourcing is an Offshore Market Research service company for Clinical Research, Bio Chemistry, Bio Technologies. Market Research services includes both Quantitative and Qualitative Market Research services Worldwide with affordable price.
    , Nov 30, 2012
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.