NOTE: This applies to MS SQL 2008+.
I don't know what your data structure looks like, but maybe something along the lines of
/* Test Data */
WITH stocks AS (
/* Jan = 10 = 2 per quint */
SELECT 'abc' AS StockName, 100.00 AS StockPrice, '20170101' AS PriceDate UNION ALL
SELECT 'def' AS StockName, 99.00 AS StockPrice, '20170101' AS PriceDate UNION ALL
SELECT 'ghi' AS StockName, 50.00 AS StockPrice, '20170101' AS PriceDate UNION ALL
SELECT 'jkl' AS StockName, 50.00 AS StockPrice, '20170101' AS PriceDate UNION ALL
SELECT 'mno' AS StockName, 75.00 AS StockPrice, '20170101' AS PriceDate UNION ALL
SELECT 'pqr' AS StockName, 77.00 AS StockPrice, '20170101' AS PriceDate UNION ALL
SELECT 'stu' AS StockName, 20.00 AS StockPrice, '20170101' AS PriceDate UNION ALL
SELECT 'vwx' AS StockName, 10.00 AS StockPrice, '20170101' AS PriceDate UNION ALL
SELECT 'yz1' AS StockName, 2.00 AS StockPrice, '20170101' AS PriceDate UNION ALL
SELECT '234' AS StockName, 1.00 AS StockPrice, '20170101' AS PriceDate UNION ALL
/* Feb = 7 = uneven quints */
SELECT 'abc' AS StockName, 1.00 AS StockPrice, '20170201' AS PriceDate UNION ALL
SELECT 'def' AS StockName, 2.00 AS StockPrice, '20170201' AS PriceDate UNION ALL
SELECT 'ghi' AS StockName, 20.00 AS StockPrice, '20170201' AS PriceDate UNION ALL
SELECT 'jkl' AS StockName, 55.00 AS StockPrice, '20170201' AS PriceDate UNION ALL
SELECT 'mno' AS StockName, 50.00 AS StockPrice, '20170201' AS PriceDate UNION ALL
SELECT 'pqr' AS StockName, 100.00 AS StockPrice, '20170201' AS PriceDate UNION ALL
SELECT 'stu' AS StockName, 90.00 AS StockPrice, '20170201' AS PriceDate UNION ALL
/* Mar = 3 = not enough for 5 quints. */
SELECT 'abc' AS StockName, 42.00 AS StockPrice, '20170301' AS PriceDate UNION ALL
SELECT 'jkl' AS StockName, 42.00 AS StockPrice, '20170301' AS PriceDate UNION ALL
SELECT 'vwx' AS StockName, 42.00 AS StockPrice, '20170301' AS PriceDate
)
/* Query */
SELECT y.StockName, y.StockPrice, y.PriceMonth, y.quintile
FROM (
SELECT x.StockName, x.StockPrice, month(x.PriceDate) AS PriceMonth
, NTILE(5) OVER (PARTITION BY month(x.PriceDate) ORDER BY x.StockPrice DESC) AS quintile
FROM stocks x
GROUP BY x.StockName, x.StockPrice, month(x.PriceDate)
) y
ORDER BY y.PriceMonth, y.quintile ASC
Gives you
StockName StockPrice PriceMonth quintile
abc 100.00 1 1
def 99.00 1 1
pqr 77.00 1 2
mno 75.00 1 2
ghi 50.00 1 3
jkl 50.00 1 3
stu 20.00 1 4
vwx 10.00 1 4
yz1 2.00 1 5
234 1.00 1 5
pqr 100.00 2 1
stu 90.00 2 1
jkl 55.00 2 2
mno 50.00 2 2
ghi 20.00 2 3
def 2.00 2 4
abc 1.00 2 5
abc 42.00 3 1
jkl 42.00 3 2
vwx 42.00 3 3
Then when you display it, you can just sort/group it by the quintile.
Also, my example above illustrates how NTILE() may not necessarily give you what you're looking for. You may have to calculate then create quintiles yourself. See March group >> all are $42, yet they got put into 3 different quintiles. It's also below the other Quintile 3 Prices. So check it's what you want.
Lastly, it would be better to add a Date Dimension Table that pre-calculates the date parts for you, and then JOIN
that to your main sub-query, but that is a whole different discussion.