Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, i am new to qlikview and i'd like to make an application that has an input some tables from yahoo finance and then calculates the cc returns and other things that needs them in the formula, but i have some problems with cc returns.
In the input file i only need the field [Adj Close], and they're in decreasing order of date (the first date is related to december 2014). I tried with
log(Above(Avg([Adj Close])))-log(Avg([Adj Close]))
but the result is a bit different from the plot i obtain in R
(r code is
diff(log(funds.z))
and diff is the lagged difference with interval 1, that should be the same as the above function).
Can anyone help me with the cc returns formula? Thanks in advance
Dear Fabio,
I use an extraction of your data to perform this formula diff(log(Media)) in R.
Media is the mean of all values in a year, so I had 45 values for Media.
Results are ugual to those you have in QV (with the option in tab Number fixed to 5 or more decimals), but opposite: are you sure the correct expression is log(Above(Avg([Adj Close])))-log(Avg([Adj Close]))?
If I change minus with plus, -log(Above(Avg([Adj Close])))+log(Avg([Adj Close])), I obtain the same results as is R.
Let me know!
Elena
Hi, Can you uoload an example or a file qv, please?
This is what i've done
I do not know if I can help you, because not quite understand the problem and what you want to solve
Oh, i forgot the data, maybe it can help (extract the archive and put the folder Data in the same of qvw file)
Dear Fabio,
I use an extraction of your data to perform this formula diff(log(Media)) in R.
Media is the mean of all values in a year, so I had 45 values for Media.
Results are ugual to those you have in QV (with the option in tab Number fixed to 5 or more decimals), but opposite: are you sure the correct expression is log(Above(Avg([Adj Close])))-log(Avg([Adj Close]))?
If I change minus with plus, -log(Above(Avg([Adj Close])))+log(Avg([Adj Close])), I obtain the same results as is R.
Let me know!
Elena
solutions to most of problems are little things, thanks