# Tag Info

0

I'm not sure that you fully understand what is meant by the term "API". You are describing items that you can create yourself with any basic API/data source, really. You'd have to have some programming knowledge, as would anyone that uses an API, but it doesn't sound like you want to get that deep into this.

0

You won't find any real time screener anywhere, because of the comission you need to pay to the stock market. But if you can manage to get the data flow, you can run a script in matlab or any other language every few time, so that it is almost real time.

2

I'm going to separate your question in two. The key thing you're asking is that how does Return.rebalancing treat your different frequencied and number of asset return and weight objects. Data munging: It subsets the first ncol(weight) columns of R (as ncol(edhec) > ncol(weights) ncol R is now 11. Checks if the first date in R is less than the first date ...

1

I found out that the upper time series is the result of a call > tail(Return.rebalancing(edhec,weights)) portfolio.returns 2009-03-31 0.005082048 2009-04-30 0.022982981 2009-05-31 0.037432398 2009-06-30 0.011107189 2009-07-31 0.025580507 2009-08-31 0.017983519 (by optical comparison. ;-) ) A glance ...

1

The GBM is a continuous model, so using large integer time steps naturally leaves large discretization error (which vanishes when you increase the number of steps). Use small time step 0.001: paths(j + 1,i) = paths(j,i) * exp((mu - vol^2/2)*0.001 + vol * 0.001^0.5*shocks_ant(j,i)); Then the mean is almost exactly 100 as expected.

0

appearantly your sampling variance is too large. I reimplemented your example in R. What I first saw is, that the mean got worse if I took more time steps (you take $300$). Your volatility is $0.3$ which is $30\%$ per year and you sample $300$ years. What you should do is the following: define a variable nbr_steps_peryear choose the number of years then ...

2

You should look at confidence interval. Normally, your confidence interval size is proportional to the standard deviation, looking something like: with probability $p$ your value will be in the interval: $$[\bar{S} - k*StdDev, \bar{S} + k*StdDev]$$ Then, getting back to your simulation, we can say that your time step is very big (1 year) and you simulate ...

0

You're confusing the language that you will use for your analysis with the language you will use to execute your results. The modern approach for APIs (for all industries/apps) is to use and HTTP based REST API that is exposed to the outside world, most likely with something like JSON. This approach works because it can be used by a large variety of ...

3

You have typo "vol^2", but it should be "vol". Its $$\sqrt{\sigma^2T}=\sigma\sqrt{T}$$

Top 50 recent answers are included