## Search found 27 matches

Fri Jan 22, 2021 7:08 am
Forum: Data Manipulation
Topic: fetching data from bloomberg from an index
Replies: 0
Views: 835

### fetching data from bloomberg from an index

Hi, my question, is it possible to fetch using the bloomberg data base all the underlying stocks from an index choosing just the index ticket? maybe writing a code to get all members from and index at once.

Thanks
Thu Aug 20, 2020 11:15 am
Forum: Data Manipulation
Topic: inverse matrix and NA value
Replies: 4
Views: 4784

### Re: inverse matrix and NA value

Yes, it is working, thanks Gareth.
Wed Aug 19, 2020 12:11 pm
Forum: Data Manipulation
Topic: inverse matrix and NA value
Replies: 4
Views: 4784

### Re: inverse matrix and NA value

Hi Gareth, yes it worked but the thing is I am running a loop when sometimes the inverse of the matrix is a number (because the matrix to inverse is a number matrix) and sometimes the inverse of the matrix gives me an error (because the matrix to inverse is a na matrix). I was trying to use your cod...
Wed Aug 19, 2020 11:15 am
Forum: Data Manipulation
Topic: inverse matrix and NA value
Replies: 4
Views: 4784

### inverse matrix and NA value

Hi, I am trying to take the inverse of a matrix with one value which is an NA. I want the inverse of this matrix to be an NA as well but it gives me an error. Anyone knows how to do this?

NA found in matrix in ""

Thanks
Wed Jul 15, 2020 1:43 pm
Forum: Data Manipulation
Topic: sample every 30th observation from a series
Replies: 4
Views: 4822

### Re: sample every 30th observation from a series

Thank you Gareth, it works perfectly.

Regards
Wed Jul 15, 2020 12:59 pm
Forum: Data Manipulation
Topic: sample every 30th observation from a series
Replies: 4
Views: 4822

### Re: sample every 30th observation from a series

my data is daily and have observations since 1989.

It doesnt matter if a month have 31 or 28 or 29, just need to substract 30 observations so yes 5/16/2020.

Thanks
Wed Jul 15, 2020 12:39 pm
Forum: Data Manipulation
Topic: sample every 30th observation from a series
Replies: 4
Views: 4822

### sample every 30th observation from a series

Hi, I need to sample every 30th observation from a series starting from the last observation, this is if my last observation is on the 7/15/2020, then the 30th observation before that would be the 6/15/2020, and then 5/15/2020. I was trying to use dateadd but didnt work. I hope someone knows the ans...
Wed Jul 15, 2020 11:05 am
Forum: Data Manipulation
Topic: last day of a month
Replies: 5
Views: 5120

### Re: last day of a month

I made some changes to part of your code to make it work, here it is in case anybody needs it. series return1 = @recode(@month<>@month(1), stockprice, na) series return2= @recode(return1=na, return2(-1), return1) series return3=(return2-return2(-1))/return2(-1) series return4 = @recode(@month<>@mont...
Wed Jul 15, 2020 7:51 am
Forum: Data Manipulation
Topic: last day of a month
Replies: 5
Views: 5120

### Re: last day of a month

Yes, thank you, it works.

Regards
Tue Jul 14, 2020 12:53 pm
Forum: Data Manipulation
Topic: last day of a month
Replies: 5
Views: 5120

### Re: last day of a month

Thanks, you know it all. I have another question, how do you get the returns for a month, taking into account that some months have 31 days, others 30 and some 28 or 29?

Thanks
Tue Jul 14, 2020 12:27 pm
Forum: Data Manipulation
Topic: last day of a month
Replies: 5
Views: 5120

### last day of a month

Hi, I am trying to sample the last day of each month in a daily series. is there a way to do it?

Thanks
Tue Jul 14, 2020 8:20 am
Forum: Data Manipulation
Topic: export observation into a matrix
Replies: 2
Views: 4258

### Re: export observation into a matrix

Perfect, thank you.

Regards
Tue Jul 14, 2020 7:32 am
Forum: Data Manipulation
Topic: export observation into a matrix
Replies: 2
Views: 4258

### export observation into a matrix

Hi, I am trying to take an observation from a series, for example, observation corresponding to the date 06/03/2018, and save it in a matrix. Anyone knows how to do it?

Thanks
Thu Jun 25, 2020 8:24 am
Forum: Data Manipulation
Topic: save matrix into an existing file
Replies: 1
Views: 4073

### save matrix into an existing file

Hi, my question, is it possible to save a matrix into an existing excel file?, this would mean to update the file. I have a bunch of matrices that I want to save into the same excel file and the only code that I know is ".write(t=xls,b4)". I would like to save the matrices in different cel...
Thu Jun 18, 2020 2:44 pm
Forum: Data Manipulation
Topic: how to save a regression coefficient
Replies: 3
Views: 4789

### Re: how to save a regression coefficient

I fixed it, I needed to add this code: table(1,1) table name, before the tablename(1,1)=modela.@coef(2).

Thank you very much