How to convert Yearly product to Monthly? - google-earth-engine

I'm trying to convert the dataset "JRC Yearly Water Classification History, v1.3" to a Monthly product, because it doesn't exist. I need it for do a chart "Surface vs Month" in a specific zone from South America called "Laguna Llancanelo". Someone know how to do it? (Sorry for my English)

Related

Time Series Analysis with weekly data, how to define frequency?

I am trying to analyze this time series data from the Wooldridge Econometrics book containing weekly data on the New York Stock Exchange, beginning in the year 1976 January and ending in 1989.
I have never worked with the ts() function before but I understand the general grammar already. What I have difficulties with, is how I should define the frequencies since every 4th year has 366 instead of 365 days. In the book is already stated that for holidays or weekends, the following day was used, when the stock exchange was open.
So how do I exactly deal with this problem of creating a time series object?
Here is a screenshot of the first rows of the data frame:
data frame of nyse

Using R to find "Percent of Sales" per SKU for forecasting

I am fairly new to R and would like to see if it is possible to make more efficient my forecasting methodology. I attempted to use R time series analysis for forecasting but my data set is relatively small in size and contains a lot of 0's/NA's. The methodology for forecasting I would like to use is Percent of Total Sales per Product (SKU from here on). So if I sold $10,000 in January 2022, and 40 units of SKU X at $10 per unit, SKU X would make up 4% of sales, then I could use that 4% of sales and apply it to a future sales dollars forecast. So if my Sales dollars forecast is $20,000 for February 2022 I would forecast 80 Units of this SKU. Any idea how to get started on this? From formatting and reading in data (data is currently in .xlsx format with headers) to packages or functions to use? Trying to output to an excel file .xlsx or .csv
PS I am currently doing this in excel with links to multiple workbooks but prefer not to use excel

Calculate average by group and starting in an specific date, in R

Here we have a panel data of "pessoas contadas" (counted people) in the city of Rio de Janeiro, by "dia" (day) and "bairro" (neighborhood). I want to calculate the average of counted people, by "bairro", in the last n days, according to the day 24/03/2020. The result must be repeated along the role panel, by "bairro". How can I do it?
You can download the dataset here: https://www.dropbox.com/s/yz5fkgs0vuyoi8s/teste.xlsx?dl=0

Sort stock price volatility data into deciles on a monthly rolling basis and calculate the return on outcoming portfolios

As the title suggests I am doing some research about low volatility stocks for my Bachelor thesis.
I compiled the stock price quotes of German listed companies for 15 year and my goal is to build deciles of the stocks based on the volatility of stock prices in the prior month. This should happen on a rolling basis, i.e. every month new deciles. The deciles represent the portfolios and the code should also be able to give out the return of the different deciles over the 15 year period. Weighting of single stocks would be the same for the beginning.
My professor suggests to use R for the monthly rebalancing of the portfolios and everything else connected with the quantitative part of the thesis.
Now comes the problem. Unfortunately, I have absolutely now experience in coding and even though I watched some tutorials and am able to do some basic stuff in R, developing the code necessary for my problem is by far beyond my knowledge.
I really appreciate any help I can get on my problem and would be massively thankful for every hint.
Kind regard
Edit:
To have a more precise explanation of the problem, I will try to illustrate the problem below:
We have 100 stocks right now.
Month 1:
1.Decile: 10 Stocks with highest volatility in prior month grouped in one portfolio.
.
.
.
10.Decile: 10 Stocks with lowest volatility in prior month grouped in one portfolio.
Month 2:
1.Decile: 10 Stocks with highest volatility in prior month grouped in one portfolio.
.
.
.
10.Decile: 10 Stocks with lowest volatility in prior month grouped in one portfolio.
This sorting goes on for every month in the 15 year period. Obviously, every single stock can be in different deciles every month as it is set by its prior volatility.
Furthermore, the code should do as if I invest for example 1 dollar in the highest volatility portfolio, i.e. 10 cents in every stock. Then I hold the stock over the month and then the code needs to check whether there was a change in the 10 stocks in the highest vola portfolio and divest the stocks which are out and invest in the new in.
In the end, the code should give out the return I would have generated by following this investment strategy.
Also, this should be done for every of the deciles to compare the results for the different volatility deciles.
Hopefully, it is a bit more clear now. If there are still problems understanding it, feel free to tell me.
Thank you very much.

How to prepare my data for a Neural Network training for a natural gas ( NATGAS ) price-predictions?

I want to create an NN to predict future prices in natural gas
I'm not sure it's a simple time series problem:
Each month ( so 12 of these) I follow a future spread ( e.g sep-oct ) until the front contract expires.
I start following it for approx 60 days ( data points ).
For each of the data points I have other inputs e.g. weather, inventories for the week, price of coal etc.
I have the previous 5 yrs data for each spread for each of the months of the year.
I want the NN to learn if it can predict the direction of the current months spread for the next x days of the 60 days for the particular months spread, given that I'll know weather, inventories, coal prices etc. -- the Features Vector -- at the moment of prediction.
Qus's I'd like to know if it can predict -"given this years inventories, weather patterns, coal price - where will the spread go in the next last 20 days of the contract?"
Is this suitable for a NN-based Predictor?
If so how should I be preparing my data?
I'm using MATLAB

Resources