I think you want the company in there too:
SELECT t.*,
((v - LAG(v) OVER (PARTITION BY industry, company ORDER BY day) )
/ LAG (v) OVER (PARTITION BY industry, company ORDER BY day)
) AS delta_v
FROM mytable t
ORDER BY day, industry;
I'm not sure if Postgres actually calculates the lag()
twice, but this is easier to maintain:
SELECT t.*,
(v / LAG(v) OVER (PARTITION BY industry, company ORDER BY day) ) - 1
) AS delta_v
FROM mytable t
ORDER BY day, industry;