[R-SIG-Finance] [SPAM] - Re: Skewness function for intraday data returndistribution - Email found in subject

David Reiner David.Reiner at xrtrading.com
Mon Oct 31 14:33:09 CET 2011


Pretty sure the first one is a typo - if the last power is 3/2, they match up.
HTH,
-- David

-----Original Message-----
From: r-sig-finance-bounces at r-project.org [mailto:r-sig-finance-bounces at r-project.org] On Behalf Of Patrick Burns
Sent: Monday, October 31, 2011 3:10 AM
To: r-sig-finance at r-project.org
Subject: [SPAM] - Re: [R-SIG-Finance] Skewness function for intraday data returndistribution - Email found in subject

The skewness of c * X should be equal to the skewness of X.  If I'm reading the formulas correctly, that is true of the second one but not the first.

It would be interesting to hear if you find different results intraday than I did with daily data over a year:

http://www.portfolioprobe.com/2011/10/03/predictability-of-kurtosis-and-skewness-in-sp-constituents/

On 31/10/2011 05:18, Roupell, Darko wrote:
> Hi All,
>
> I have written a skew function to calculate stock skewness using intraday 5 min data. However, going through literature I have come across two very similar formulas, though they produce different skewness coefficient and wonder if anyone else has used similar formulas and know which one is the correct one.
>
> mq_skewness = function(data){
> data = dataformatc(data);
>    #returns midquote log returns as xts object
>    mq_ret = mq_return(data);
>    #returns midquote log returns as xts object
>    mq_ret_sqr = mq_ret^2;
>    #returns realized daily volatility as xts object
>    RVar=sum(  mq_ret_sqr)
>    n = length(mq_ret);
>
>    #first formula to measure skewness
>    mq_skewness = sqrt(n) * (sum(mq_ret^3))/sum(mq_ret_sqr)^(2/3)
>
>   # second formula to measure skewness
>    mq_skewness = sqrt(n) * sum((mq_ret/sqrt(RVar))^3)
>
>    return(mq_skewness);
> }
>
>    #first formula to measure skewness
>    mq_skewness = sqrt(n) * (sum(mq_ret^3))/sum(mq_ret_sqr)^(2/3)
> [1] 0.0003991095
>    # second formula to measure skewness
>    mq_skewness = sqrt(n) * sum((mq_ret/sqrt(RVar))^3) [1] 0.09759751 #
> this is output from base package function but this may not be
> appropriate to use for intraday data
> skewness(mq_ret)
> [1] 0.3035787
> __________________________________________________
> Darko Roupell
>
>
>
> ************** IMPORTANT MESSAGE ***************************** This
> e-mail message is intended only for the addressee(s) and contains
> information which may be confidential.
> If you are not the intended recipient please advise the sender by
> return email, do not use or disclose the contents, and delete the
> message and any attachments from your system. Unless specifically
> indicated, this email does not constitute formal advice or commitment by the sender or the Commonwealth Bank of Australia (ABN 48 123 123 124) or its subsidiaries.
> We can be contacted through our web site: commbank.com.au.
> If you no longer wish to receive commercial electronic messages from
> us, please reply to this e-mail by typing Unsubscribe in the subject line.
>
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
>

--
Patrick Burns
patrick at burns-stat.com
http://www.burns-stat.com
http://www.portfolioprobe.com/blog
twitter: @portfolioprobe

_______________________________________________
R-SIG-Finance at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.


This e-mail and any materials attached hereto, including, without limitation, all content hereof and thereof (collectively, "XR Content") are confidential and proprietary to XR Trading, LLC ("XR") and/or its affiliates, and are protected by intellectual property laws.  Without the prior written consent of XR, the XR Content may not (i) be disclosed to any third party or (ii) be reproduced or otherwise used by anyone other than current employees of XR or its affiliates, on behalf of XR or its affiliates.

THE XR CONTENT IS PROVIDED AS IS, WITHOUT REPRESENTATIONS OR WARRANTIES OF ANY KIND.  TO THE MAXIMUM EXTENT PERMISSIBLE UNDER APPLICABLE LAW, XR HEREBY DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS AND IMPLIED, RELATING TO THE XR CONTENT, AND NEITHER XR NOR ANY OF ITS AFFILIATES SHALL IN ANY EVENT BE LIABLE FOR ANY DAMAGES OF ANY NATURE WHATSOEVER, INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, CONSEQUENTIAL, SPECIAL AND PUNITIVE DAMAGES, LOSS OF PROFITS AND TRADING LOSSES, RESULTING FROM ANY PERSON'S USE OR RELIANCE UPON, OR INABILITY TO USE, ANY XR CONTENT, EVEN IF XR IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR IF SUCH DAMAGES WERE FORESEEABLE.



More information about the R-SIG-Finance mailing list