Google Sheets Financial API - dates are wrong - google-sheets

I'm using Google Sheets for tracking my mutual funds portfolio, and I'm supposed to call the function below to get the timestamp of the most recent change of the VASIX fund share price:
=GOOGLEFINANCE("VASIX", "date")
The problem is that the date, returned by this function, is typically two-three days late.
What might be wrong here?

GOOGLEFINANCE("VASIX", "date") returns The date at which the net asset value was reported. For mutual funds this is at market close on trading days. So, for example, Sat. would show the market close on Fri. The date won't change again until Tue. when Mondays NAV is reoported. Try =GOOGLEFINANCE("VASIX", "close","8/25/2017") requesting specific dates over a weekend through Tuesday to see what is happening.

Related

Calculating expected ROAS (return on advertising spend) based on historical data

I need to calculate what ROAS (return on advertising spend) I should have on days e.g. 7, 14, 28 after the launch of a campaign to get 120% on day 365. I have the spend and the revenue numbers readily available. I would like to use spreadsheets only if possible. I would appreciate any tips on how to approach this.
Calculation
ROAS = Revenue attributable to ads / Cost of ads
Formula
=B9/B10
Example
Create Dropdown to pick the date.
And Use this formula to get ROAS in the chosen day you can type the day.
=INDEX(B12:12,1,MATCH(A14,B1:1,0))
Getting ROAS Launch to date
=AVERAGE(B12:12)

Find Number of Days in Current Month That Fall Between Date Range In Google Sheets

I'm trying to come up with a function that will calculate a monthly budget from within a specified date range. I tried to use SUMIFS but I can't figure out how to isolate a specific month within the range.
Example:
We have a sheet with Google Ad campaigns, with a row for each campaign.
We are running one Google Ad campaign (A) from 2/15/20 to 5/15/20 with a total budget of $3000 from which I calculate a daily budget of $33.33.
We are running a second campaign (B) from 5/15/20 to 8/15/20, also with a budget of $3,000, from which I calculate a daily budget of $32.61.
=IF(NOT(ISBLANK(Start_Date)),Total_Budget/(End_Date-Start_Date),"")
In a separate sheet, I have Budget and Spend fields for each month. For May, I need it to calculate the total budget for 5/1-5/15 of Campaign A, and 5/15-5/31 of Campaign B.
I got this far (J is the Daily_Budget, G is the Start_Date, and H is the End_Date):
=SUMIFS(Google!J2:J30, Google!G2:G30,"<="&DATE(2020,5,1),Google!H2:H30,">="&DATE(2020,5,31))
Then I was at a loss for how to extrapolate the number of days from the range, so that I could then multiply them by the Daily Budget and then add them together.
I thought of going back to the sheet that contains the campaigns and adding columns for each month with a complicated conditional, and then just using SUM(), but I feel like there has to be a more elegant solution.
UPDATE
Per request, here is a link to the spreadsheet with the desired results manually entered: Click here. May & June show the campaign partial month overlaps. The result I'm ultimately going for is =(15*Google!J2)+(16*Google!J3).
UPDATE 2 (24Jun20)
Per request, I have shared the spreadsheet so that people can make a copy and experiment with formulas: Click here..
Any ideas?
Thanks,
Ty
I would use the function DATEDIF() (documentation here). You can set the first parameter as the first day of the month you are trying to calculate the number of days within it, and the second as the first day from another month. Example:
DATEDIF(DATE(2020, 1, 1), DATE(2020, 2, 1), "D")
You could probably make a custom function with this as well to input only the number of each month (and year, in case of leap years on February), but I don't have much experience with that unfortunately.

How do I get the nearest past date in a range for each entry in another list?

I collect customer feedback for my education business and add it to a Google Sheet. The feedback data has a submission date (A2:A) and some satisfaction metrics, which I visualize in a Google Data Studio dashboard.
The problem is that I want the feedback per cohort, but not everyone fills in the feedback form on the same day. I have a list of all courses with their respective dates (Cohorts!A2:A), and I want to assign each feedback submission to their respective cohort in a new column. It would be nice to also match it to the specific course type and country, but for now matching the cohort date would suffice.
I've tried using VLOOKUP and ARRAYFORMULA to go through the feedback dates and get the nearest past date to take it as the "course date" for that student. All the solutions I've tried either only take a single date or TODAY as a reference, but I have a whole list I'd like to fill in.
From my understanding, you are trying to round the timestamp, then match it to your course table?
To round a timestamp to a date:
=INT($A2)
When doing lookups like you're describing, I frequently end up calculating the nearest week as well - this formula returns the Sunday of the week start. Figured it might be helpful.
=text($A2+CHOOSE(WEEKDAY($A2),0,-1,-2,-3,-4,-5,-6),"m/d/yyyy")

Start Date Calculation in google sheets

Recently Google analytics became available as an add on for google sheets.
It is fairly intuitive however I need a way to auto calculate the start date of a month starting with todays date eg today is the 11/02/15 so I would like it to return the 01/02/15 utilising the available date functions.
My purpose is to run a report for this months data only which can be updated as the month continues. In the next month it would need to start again.
I have an absolute fix but this is not scalable, If you have a function based solution please help.
=eomonth(today(),-1)+1
is a formula that takes the date for today, finds the end of the preceeding month and then adds one day.

YQL Fantasy Hockey - League Standings by Month?

I'm trying to gather league standings by month (or a custom time period)
I know how to do it for a specific date but can't seem to find a way to do from x to y
Is this possible? (other than repeating the query for each day I want)
Is is not a head to head or rotisserie league, just straight overall points.
Edit:
Example query:
No, there is no way to fetch by month or for a date range. If you look at the YQL table fantasysports.leagues.scoreboard, you can see the parameters only accept the optional week parameter. This matches the Yahoo! Fantasy Sports API docs (search for 'scoreboard') which shows it can give results for the current week, or another specified week.
I think this is because the Yahoo! Fantasy Sports scoreboards are all week-based, regardless of the actual frequency of games for the specific sport.
To capture scores by month, you can make several individual calls for each week.

Resources