Future Advisor Interview Question for Software Engineer / Developers
- 0of 0 votes
AnswersWelcome - congratulations on being selected to continue your application to join the engineering team here at FutureAdvisor.
- dhaval0129 July 26, 2011
A small number of applicants make it this far in the process.
This next stage, which is the final stage before in-person interviews at our offices in Pioneer Square in Seattle,
is a programming problem to be completed on your own time.
Note that we expect this problem to take only a couple hours,
but you can take as long as you wish (just let us know if it'll be more than a week).
This problem is language agnostic - feel free to use whatever you're most comfortable with.
The accompanying text file gives the historical prices, by month, of 28 different stocks and mutual funds
(from now on we'll call them both securities and make no distinction) for the time period Nov 2000 to Nov 2010.
The format is the following:
<Security Name> | <Security Symbol> | <array of historical prices per share>
The array of historical prices per share is in chronological order,
meaning that a[0] is the oldest price and a[119] is the most recent price.
The problem is the following: imagine an investor is selecting securities for his or her portfolio,
and wants to know which securities have had the most spectacular periods (i.e. "bursts")
of growth over the last 10 years. Formally defined, we're asking you to examine the historical
data of each security in the Data File, and determine for each security the single time period
where it had the biggest percentage gain in price. This could be a time period of 1 month,
some span of several months, or even the entire 120 months, depending on the security.
Your program should output the securities in order, from those with the biggest bursts
(in terms of percentage gain) to those with the smallest, and give both the time period
and the return (change in price over initial price) for each.
Please feel free to ask any questions that come up while you're working on this.
There are several ways to approach the problem, so don't feel that there's only
one way to solve it, but of course be ready to talk about possible efficiencies
and inefficiencies of your chosen implementation.
When you're done email your solution (either the single file or a zip if it's multiple)
to hackers@futureadvisor.com. We respond to most submissions within 1-2 business days,
and as appropriate will schedule interviews immediately.
Best of luck. We look forward to seeing your work.
Microsoft Corporation | MSFT | [17.47, 24.6, 23.77, 22.03, 27.29, 27.87, 29.41, 26.66, 22.98, 20.61, 23.42, 25.86, 26.69, 25.66, 23.5, 24.29, 21.05, 20.51, 22.03, 19.33, 19.77, 17.62, 21.54, 23.23, 20.83, 19.12, 19.15, 19.57, 20.67, 19.89, 20.72, 21.34, 21.43, 22.47, 21.25, 20.9, 22.24, 22.47, 21.56, 20.26, 21.24, 21.32, 23.21, 23.16, 22.25, 22.54, 22.8, 24.36, 24.28, 23.88, 22.93, 22.03, 23.06, 23.59, 22.71, 23.41, 25.11, 23.59, 23.56, 25.45, 24.05, 25.89, 24.79, 25.11, 22.28, 20.98, 21.58, 22.29, 23.89, 25.43, 26.69, 27.39, 27.86, 28.79, 26.37, 26.09, 28.03, 28.82, 27.68, 27.23, 27.08, 27.77, 34.69, 31.77, 33.66, 30.83, 25.82, 26.94, 27.07, 26.98, 26.21, 24.5, 26.1, 25.53, 21.36, 19.47, 18.72, 16.47, 15.66, 17.81, 19.64, 20.38, 23.19, 22.95, 24.19, 25.24, 27.21, 28.99, 30.04, 27.77, 28.39, 29.0, 30.24, 25.66, 22.89, 25.67, 23.47, 24.49, 26.67, 26.95]
Apple | AAPL | [7.44, 10.81, 9.12, 11.03, 12.74, 9.98, 11.62, 9.4, 9.27, 7.76, 8.78, 10.65, 10.95, 12.36, 10.85, 11.84, 12.14, 11.65, 8.86, 7.63, 7.38, 7.25, 8.03, 7.75, 7.16, 7.18, 7.51, 7.07, 7.11, 8.98, 9.53, 10.54, 11.31, 10.36, 11.44, 10.45, 10.69, 11.28, 11.96, 13.52, 12.89, 14.03, 16.27, 16.17, 17.25, 19.38, 26.2, 33.53, 32.2, 38.45, 44.86, 41.67, 36.06, 39.76, 36.81, 42.65, 46.89, 53.61, 57.59, 67.82, 71.89, 75.51, 68.49, 62.72, 70.39, 59.77, 57.27, 67.96, 67.85, 76.98, 81.08, 91.66, 84.84, 85.73, 84.61, 92.91, 99.8, 121.19, 122.04, 131.76, 138.48, 153.47, 189.95, 182.22, 198.08, 135.36, 125.02, 143.5, 173.95, 188.75, 167.44, 158.95, 169.53, 113.66, 107.59, 92.67, 85.35, 90.13, 89.31, 105.12, 125.83, 135.81, 142.43, 163.39, 168.21, 185.35, 188.5, 199.91, 210.73, 192.06, 204.62, 235.0, 261.09, 256.88, 251.53, 257.25, 243.1, 283.75, 300.98, 304.18]
Home Depot | HD | [38.22, 40.32, 35.56, 36.09, 39.44, 41.28, 39.59, 42.21, 38.54, 32.18, 32.07, 39.17, 42.83, 42.06, 41.99, 40.86, 38.98, 35.04, 30.91, 25.99, 27.72, 22.0, 24.34, 22.25, 20.29, 17.66, 19.81, 20.64, 23.83, 27.52, 28.11, 26.48, 27.3, 27.09, 31.53, 31.27, 30.25, 30.23, 30.94, 31.9, 30.05, 30.67, 30.13, 28.86, 31.36, 33.63, 35.24, 35.89, 36.74, 35.46, 34.4, 32.95, 30.48, 33.91, 33.6, 37.59, 34.92, 33.03, 35.54, 36.27, 35.14, 35.2, 36.59, 36.85, 34.79, 33.21, 31.31, 30.36, 29.99, 31.86, 32.8, 33.56, 35.49, 36.01, 34.99, 32.66, 33.67, 34.55, 35.18, 33.23, 34.47, 29.19, 28.35, 25.91, 24.44, 27.8, 24.09, 25.6, 26.36, 25.05, 21.62, 22.0, 25.03, 24.1, 21.96, 21.51, 21.66, 20.26, 19.65, 22.44, 25.07, 22.06, 22.72, 24.94, 26.24, 25.82, 24.32, 26.52, 28.28, 27.38, 30.49, 31.85, 34.69, 33.34, 27.83, 28.27, 27.82, 31.68, 30.9, 30.71]
General Electric | GE | [35.51, 34.06, 34.44, 31.12, 36.08, 36.43, 36.43, 32.44, 30.5, 27.87, 27.28, 28.84, 30.16, 27.96, 29.11, 28.28, 23.85, 23.54, 22.1, 24.5, 22.94, 18.88, 19.34, 20.78, 18.8, 17.86, 18.71, 19.84, 22.91, 22.33, 22.46, 22.27, 23.16, 23.49, 22.86, 22.59, 24.57, 26.67, 25.95, 24.36, 23.9, 24.83, 26.01, 26.69, 26.32, 27.12, 27.55, 28.56, 29.65, 29.35, 28.78, 29.48, 29.59, 29.82, 28.5, 28.38, 27.65, 27.88, 28.08, 29.58, 29.23, 27.31, 27.61, 29.22, 29.06, 28.78, 27.9, 27.67, 28.83, 30.09, 29.93, 30.08, 31.96, 30.96, 30.22, 30.61, 31.9, 32.53, 33.37, 33.79, 33.89, 36.34, 36.13, 33.61, 32.81, 31.3, 29.6, 33.06, 29.21, 27.44, 24.11, 25.55, 25.38, 23.34, 17.86, 15.72, 15.11, 11.32, 8.17, 9.71, 12.15, 12.94, 11.35, 12.97, 13.46, 15.99, 13.89, 15.6, 14.83, 15.76, 15.84, 17.95, 18.6, 16.13, 14.31, 16.0, 14.37, 16.25, 16.02, 15.95]
PowerShares QQQ Trust ETF | QQQQ | [56.43, 62.15, 45.86, 37.84, 44.61, 43.23, 44.17, 40.36, 35.41, 28.01, 32.77, 38.32, 37.61, 37.22, 32.65, 34.85, 30.67, 29.04, 25.23, 23.05, 22.7, 20.03, 23.73, 26.79, 23.56, 23.62, 24.32, 24.41, 26.53, 28.79, 28.95, 30.74, 32.27, 31.34, 34.0, 34.2, 35.25, 35.84, 35.36, 34.66, 33.62, 35.34, 36.49, 33.74, 32.9, 33.98, 35.68, 37.83, 38.97, 36.51, 36.33, 35.7, 34.15, 37.17, 35.94, 38.67, 38.09, 38.56, 37.98, 40.3, 39.58, 41.14, 40.26, 41.1, 41.02, 38.05, 38.03, 36.39, 38.12, 39.89, 41.79, 43.22, 42.41, 43.3, 42.58, 42.8, 45.19, 46.61, 46.84, 46.77, 48.09, 50.61, 54.18, 50.51, 50.48, 44.48, 42.33, 43.12, 46.56, 49.32, 44.58, 44.87, 45.52, 38.43, 32.48, 28.76, 29.41, 28.74, 27.23, 30.04, 33.96, 35.05, 36.09, 39.13, 39.71, 41.95, 40.67, 43.25, 45.5, 42.56, 44.52, 47.95, 49.03, 45.4, 42.61, 45.7, 43.36, 49.07, 52.18, 52.22]
Fidelity Investment Trust: Fidelity Latin America Fund | FLATX | [48.65, 46.08, 51.09, 51.74, 48.99, 46.91, 51.83, 51.34, 46.32, 45.76, 41.01, 40.98, 37.84, 38.65, 32.08, 27.64, 25.43, 26.63, 27.05, 25.74, 27.58, 41.75, 53.06, 58.08, 64.21, 68.87, 63.62, 57.18, 60.4, 56.37, 59.6, 59.08, 62.95, 56.74, 50.21, 52.2, 51.36, 50.33, 45.07, 42.68, 40.56, 41.99, 41.47, 38.93, 36.95, 34.59, 34.33, 33.51, 32.56, 31.58, 36.36, 33.82, 33.87, 33.78, 28.73, 28.09, 25.73, 26.84, 23.27, 21.91, 20.79, 19.77, 18.44, 18.98, 20.73, 18.41, 18.51, 17.07, 15.6, 15.13, 14.03, 13.48, 13.1, 12.63, 12.66, 14.24, 13.88, 13.26, 13.12, 11.87, 11.35, 10.75, 10.47, 9.97, 9.58, 9.34, 9.05, 7.79, 7.37, 7.61, 7.91, 7.63, 7.43, 6.59, 7.96, 7.3, 8.78, 10.07, 10.7, 10.89, 10.45, 10.06, 9.98, 9.11, 8.46, 8.23, 9.72, 10.04, 10.65, 10.85, 10.37, 9.87, 10.8, 11.94, 10.62, 9.82, 11.22, 11.67, 12.47, 12.13]
Fidelity Magellan Fund | FMAGX | [58.84, 62.91, 68.46, 67.44, 63.25, 61.4, 64.21, 61.53, 58.35, 61.7, 58.59, 57.35, 52.73, 53.46, 50.33, 44.27, 38.87, 42.06, 45.49, 43.37, 48.91, 62.39, 76.05, 76.11, 79.23, 86.47, 83.9, 78.77, 80.53, 81.84, 89.89, 89.58, 93.11, 88.4, 83.23, 82.28, 83.81, 84.16, 80.87, 77.15, 76.52, 77.81, 75.63, 76.04, 74.11, 72.01, 71.21, 69.54, 71.79, 72.32, 76.03, 74.6, 72.66, 73.76, 70.4, 69.03, 66.79, 67.66, 67.19, 67.97, 65.34, 65.32, 63.04, 64.37, 65.68, 64.91, 66.15, 64.15, 62.09, 61.15, 60.58, 60.43, 62.89, 61.99, 61.35, 62.41, 63.21, 62.33, 61.54, 58.48, 58.23, 55.52, 56.35, 55.43, 54.71, 54.11, 51.82, 47.88, 47.36, 47.94, 49.3, 52.81, 50.19, 45.86, 51.39, 50.89, 54.83, 59.38, 59.51, 63.55, 61.47, 62.55, 64.58, 63.92, 59.47, 58.09, 63.2, 67.58, 68.63, 70.37, 69.63, 64.03, 68.4, 75.47, 73.09, 72.46, 79.2, 80.64, 85.24, 80.11]
Vanguard Index Funds: Vanguard 500 Index Fund; Investor Shares | VFINX | [98.95, 100.68, 109.43, 107.73, 101.62, 98.57, 102.25, 100.3, 94.64, 96.44, 92.98, 89.75, 83.43, 83.24, 78.81, 71.94, 66.13, 74.02, 80.82, 79.96, 86.14, 103.53, 113.64, 112.02, 112.96, 123.39, 121.82, 116.17, 116.69, 120.61, 128.33, 129.23, 134.87, 132.78, 128.01, 126.12, 130.14, 132.36, 127.91, 122.5, 121.15, 123.58, 121.77, 120.08, 117.87, 114.16, 111.3, 108.74, 108.08, 107.94, 111.16, 109.7, 108.36, 108.08, 105.3, 105.27, 101.45, 103.18, 102.37, 103.31, 99.62, 99.5, 96.44, 98.32, 100.08, 98.03, 100.5, 97.2, 93.42, 92.03, 91.05, 90.71, 93.81, 92.04, 90.81, 92.26, 93.68, 92.41, 90.75, 86.25, 85.51, 80.94, 81.82, 80.27, 78.9, 77.91, 74.02, 68.37, 67.73, 68.77, 70.63, 75.25, 70.89, 65.17, 73.13, 72.65, 78.73, 84.79, 85.43, 90.96, 87.67, 89.41, 90.74, 89.95, 83.56, 82.01, 89.23, 95.2, 96.17, 98.58, 97.94, 90.88, 97.05, 106.81, 103.16, 102.63, 111.41, 111.89, 118.14, 111.25]
Vanguard STAR Funds: Vanguard STAR Fund; Investor Shares | VGSTX | [16.99, 17.35, 18.36, 18.14, 17.43, 17.14, 17.49, 17.29, 16.66, 16.88, 16.32, 15.92, 14.96, 14.84, 14.09, 13.17, 12.43, 13.26, 14.01, 13.42, 13.9, 15.97, 17.29, 17.25, 17.41, 18.34, 18.16, 17.52, 17.74, 17.99, 18.68, 18.88, 19.3, 18.93, 18.43, 18.3, 18.57, 18.7, 18.3, 17.81, 17.7, 17.71, 17.53, 17.4, 17.06, 16.68, 16.41, 16.06, 16.01, 16.02, 16.42, 16.23, 16.14, 16.14, 15.71, 15.46, 15.08, 15.35, 15.12, 15.02, 14.71, 14.58, 14.21, 14.33, 14.53, 14.32, 14.49, 14.08, 13.66, 13.47, 13.22, 13.11, 13.41, 13.19, 13.11, 13.44, 13.45, 13.25, 12.98, 12.57, 12.41, 11.97, 11.87, 11.65, 11.65, 11.54, 10.99, 10.39, 10.36, 10.45, 10.58, 10.81, 10.43, 10.08, 10.69, 10.51, 11.13, 11.65, 11.65, 11.87, 11.57, 11.6, 11.74, 11.55, 11.16, 10.93, 11.57, 11.84, 11.81, 11.98, 11.82, 11.34, 11.57, 11.95, 11.67, 11.15, 11.49, 11.45, 11.54, 10.97]
Vanguard World Funds: Vanguard International Growth Fund; Investor Shares | VWIGX | [15.3, 15.43, 17.22, 17.42, 16.25, 16.13, 16.99, 16.72, 16.03, 16.31, 15.47, 15.11, 13.68, 13.84, 12.13, 10.77, 9.89, 10.72, 12.0, 11.05, 11.99, 15.53, 17.83, 18.6, 19.36, 21.29, 20.84, 19.69, 19.88, 19.71, 21.66, 22.16, 22.92, 21.8, 20.5, 20.64, 20.97, 20.81, 20.16, 19.26, 18.79, 18.94, 18.72, 18.14, 17.62, 16.94, 16.96, 16.49, 16.31, 16.26, 17.07, 16.34, 15.83, 15.9, 14.86, 14.06, 13.74, 14.19, 13.59, 13.16, 12.71, 12.57, 12.56, 12.85, 13.17, 12.65, 12.92, 12.36, 11.6, 11.3, 11.0, 10.9, 11.28, 11.08, 11.12, 11.54, 11.39, 11.11, 10.86, 10.18, 10.0, 9.48, 9.31, 9.07, 8.8, 8.66, 8.2, 7.47, 7.55, 7.81, 8.08, 8.38, 7.97, 7.45, 8.46, 8.46, 9.41, 9.83, 9.91, 9.84, 9.35, 9.36, 9.79, 9.47, 9.01, 8.71, 9.86, 10.15, 10.38, 10.81, 11.21, 10.63, 11.34, 12.14, 12.08, 11.57, 11.85, 12.23, 13.07, 13.17]
Fidelity Select Portfolios: Computers Portfolio | FDCPX | [45.31, 45.96, 48.18, 46.41, 43.59, 41.23, 45.59, 42.11, 40.16, 41.95, 38.9, 36.9, 33.07, 31.23, 30.56, 26.86, 23.45, 24.95, 24.89, 25.21, 29.11, 34.94, 41.12, 40.34, 40.74, 45.73, 43.24, 39.64, 40.25, 39.32, 48.35, 48.19, 52.8, 47.69, 46.05, 44.38, 43.77, 43.23, 40.55, 39.63, 39.28, 40.72, 39.49, 39.59, 37.8, 36.39, 35.36, 32.32, 34.12, 35.39, 38.04, 37.67, 37.55, 37.78, 36.08, 36.36, 33.98, 35.54, 35.6, 36.06, 33.71, 34.31, 31.09, 33.4, 34.65, 33.34, 35.15, 34.02, 32.11, 29.74, 28.58, 30.75, 34.9, 34.65, 32.57, 36.16, 37.5, 37.97, 35.86, 36.61, 35.84, 31.91, 32.85, 30.28, 28.13, 28.0, 24.4, 22.08, 22.36, 21.54, 22.04, 25.8, 22.57, 19.06, 22.3, 23.16, 26.47, 30.78, 32.08, 35.69, 32.73, 38.11, 38.03, 37.28, 32.71, 27.22, 36.88, 41.36, 43.24, 42.03, 44.69, 36.57, 41.3, 59.26, 52.32, 53.81, 73.64, 79.99, 93.9, 80.52]
Fidelity Select Portfolios: Electronics Portfolio | FSELX | [39.71, 40.65, 43.6, 42.88, 39.66, 37.14, 41.5, 36.33, 34.49, 37.79, 36.66, 35.12, 30.09, 29.26, 27.84, 24.29, 20.92, 21.3, 22.43, 21.31, 25.36, 30.43, 36.9, 35.63, 37.71, 41.94, 39.66, 36.73, 36.46, 37.67, 44.73, 44.7, 48.84, 49.53, 48.38, 47.85, 48.25, 46.77, 46.46, 43.67, 45.0, 43.3, 42.74, 43.82, 42.01, 41.22, 41.33, 38.54, 40.94, 42.14, 46.55, 45.14, 45.41, 46.66, 42.61, 42.55, 38.13, 41.23, 40.95, 41.56, 38.17, 38.44, 34.74, 36.54, 37.93, 35.14, 36.81, 35.28, 34.25, 32.04, 30.41, 33.55, 39.22, 40.54, 37.23, 41.54, 42.55, 43.32, 40.82, 41.12, 39.48, 35.16, 36.66, 32.57, 30.05, 31.02, 26.88, 24.01, 24.26, 22.74, 23.75, 30.44, 24.4, 20.8, 26.1, 28.43, 33.24, 40.95, 43.55, 48.96, 43.14, 49.05, 48.01, 47.21, 40.41, 32.6, 47.12, 51.53, 52.1, 50.98, 54.88, 43.64, 47.02, 66.61, 56.3, 55.7, 75.43, 81.75, 102.1, 87.55]
Fidelity Select Portfolios: Telecommunications Portfolio | FSTCX | [37.91, 38.72, 40.02, 39.96, 37.73, 37.01, 40.03, 37.99, 35.42, 37.28, 34.94, 35.77, 34.22, 33.93, 32.4, 28.84, 26.49, 25.65, 26.41, 25.52, 25.11, 33.85, 40.14, 39.42, 39.53, 44.54, 43.53, 40.26, 41.38, 44.49, 50.44, 51.38, 55.76, 57.21, 54.27, 53.83, 55.1, 55.18, 50.64, 49.51, 48.85, 49.34, 46.6, 45.1, 45.02, 43.93, 42.09, 39.97, 40.36, 39.67, 41.91, 42.42, 40.2, 38.84, 37.12, 37.38, 35.56, 36.1, 35.64, 36.15, 34.35, 33.97, 32.11, 32.46, 33.08, 33.43, 35.31, 34.23, 32.52, 31.52, 30.37, 31.01, 31.4, 30.64, 30.91, 32.24, 33.59, 32.47, 30.07, 28.16, 28.23, 25.81, 26.98, 26.13, 27.29, 26.64, 24.16, 22.27, 22.13, 23.87, 23.96, 26.31, 22.19, 17.54, 20.13, 17.31, 20.14, 24.31, 24.65, 28.47, 28.6, 31.3, 33.9, 33.73, 31.65, 33.26, 34.64, 38.31, 38.47, 40.55, 41.47, 38.22, 42.93, 51.11, 47.07, 48.16, 59.06, 62.84, 72.49, 69.14]
Vanguard Fixed Income Securities Funds: Vanguard Long-Term Treasury Fund; Investor Shares | VUSTX | [11.6, 11.55, 11.12, 10.86, 11.03, 11.05, 10.76, 11.41, 11.19, 11.36, 11.14, 10.95, 10.87, 10.79, 11.08, 11.67, 11.08, 11.19, 12.23, 11.23, 10.02, 10.4, 10.37, 10.19, 10.16, 9.98, 10.19, 10.38, 10.28, 10.24, 9.98, 10.02, 9.58, 9.45, 9.43, 9.25, 9.03, 9.11, 9.29, 9.21, 9.32, 9.05, 9.13, 9.33, 9.15, 9.08, 8.94, 8.7, 8.55, 8.49, 8.49, 8.66, 8.96, 8.89, 8.97, 8.77, 8.72, 8.87, 9.12, 8.87, 9.1, 8.96, 8.73, 8.46, 8.52, 8.63, 8.41, 8.23, 8.42, 8.3, 8.22, 7.95, 7.83, 7.76, 7.8, 8.26, 8.14, 7.98, 7.85, 7.75, 7.73, 7.93, 7.55, 7.44, 8.14, 8.26, 7.82, 7.75, 7.84, 7.61, 7.64, 7.31, 7.41, 7.63, 7.33, 7.03, 6.83, 6.71, 6.69, 6.45, 6.71, 6.63, 6.55, 6.67, 7.02, 6.68, 6.62, 6.49, 6.26, 6.22, 6.2, 6.37, 6.41, 6.29, 6.27, 6.12, 5.94, 5.85, 5.9, 5.78]
Van Eck Funds: Emerging Markets Fund; Class A Shares | GBFAX | [10.09, 10.24, 11.3, 10.98, 10.21, 10.07, 10.65, 10.2, 9.7, 9.72, 8.96, 8.82, 7.77, 7.88, 6.14, 4.88, 4.3, 4.54, 4.82, 4.62, 5.21, 7.89, 10.46, 11.71, 12.39, 14.02, 13.55, 12.37, 13.47, 13.39, 15.19, 15.26, 16.21, 14.99, 13.89, 14.51, 14.04, 13.44, 12.52, 11.9, 11.44, 11.27, 11.2, 10.59, 9.75, 9.47, 9.34, 9.14, 8.93, 9.09, 9.97, 9.41, 9.1, 8.93, 8.05, 7.53, 7.13, 7.59, 6.92, 6.9, 6.59, 6.35, 6.4, 6.5, 6.79, 6.42, 6.21, 5.97, 5.44, 5.23, 4.92, 4.67, 4.76, 4.89, 5.02, 5.53, 5.62, 5.34, 5.18, 4.8, 4.7, 4.36, 4.21, 3.89, 3.6, 3.36, 3.06, 2.81, 2.9, 2.92, 2.96, 3.15, 3.05, 2.87, 3.23, 3.2, 3.47, 3.73, 3.76, 3.87, 3.68, 3.74, 3.95, 3.9, 3.64, 3.54, 3.98, 4.3, 4.49, 4.7, 4.79, 4.39, 4.9, 5.59, 5.48, 5.37, 6.01, 6.28, 6.8, 6.47]
Fidelity Investment Trust: Fidelity International Discovery Fund | FIGRX | [26.69, 26.91, 30.12, 30.6, 28.56, 28.65, 30.34, 29.62, 28.42, 29.24, 28.04, 27.07, 24.66, 25.08, 22.27, 20.16, 19.01, 20.78, 23.32, 21.76, 23.19, 29.12, 33.44, 35.33, 36.94, 39.75, 38.99, 37.05, 37.79, 37.69, 41.84, 42.33, 44.21, 41.59, 38.73, 39.13, 39.35, 39.25, 37.98, 36.28, 35.19, 35.41, 35.17, 33.93, 32.78, 31.62, 31.65, 30.82, 30.58, 30.82, 32.46, 31.08, 29.81, 30.4, 28.31, 26.68, 25.95, 26.82, 25.72, 24.89, 24.07, 23.54, 23.44, 23.77, 24.55, 23.54, 23.84, 22.72, 21.19, 20.4, 19.94, 19.87, 20.97, 20.48, 20.42, 21.05, 21.05, 20.61, 20.02, 18.61, 18.17, 17.13, 16.61, 15.94, 15.46, 15.0, 13.98, 12.87, 13.08, 13.51, 13.97, 14.2, 13.76, 13.26, 14.66, 14.7, 16.14, 16.72, 16.44, 16.14, 15.13, 14.93, 15.41, 15.22, 14.47, 13.84, 15.65, 15.92, 16.4, 17.02, 17.38, 16.23, 17.46, 18.85, 18.66, 18.26, 19.26, 19.98, 21.0, 20.18]
Fidelity Concord Street Trust: Spartan US Equity Index Fund; Investor Class Shares | FUSEX | [38.01, 38.67, 42.03, 41.55, 39.19, 38.01, 39.43, 38.68, 36.49, 37.19, 35.86, 34.61, 32.17, 32.11, 30.4, 27.75, 25.5, 28.55, 31.17, 30.84, 33.23, 39.93, 43.85, 43.22, 43.59, 47.61, 47.0, 44.82, 45.02, 46.53, 49.5, 49.85, 52.03, 51.22, 49.37, 48.64, 50.19, 51.05, 49.33, 47.23, 46.72, 47.66, 46.94, 46.3, 45.44, 44.01, 42.91, 41.91, 41.66, 41.61, 42.84, 42.27, 41.76, 41.65, 40.57, 40.56, 39.09, 39.75, 39.44, 39.79, 38.37, 38.32, 37.14, 37.86, 38.53, 37.75, 38.7, 37.42, 35.97, 35.28, 35.06, 34.92, 36.12, 35.43, 34.96, 35.52, 36.07, 35.58, 34.95, 33.21, 32.92, 31.16, 31.51, 30.91, 30.37, 30.0, 28.5, 26.33, 26.08, 26.48, 27.2, 28.98, 27.3, 25.09, 28.15, 27.97, 30.33, 32.76, 33.01, 35.14, 33.87, 34.53, 35.06, 34.75, 32.29, 31.68, 34.48, 36.79, 37.25, 38.09, 37.84, 35.12, 37.51, 41.27, 39.87, 39.68, 43.07, 43.26, 45.67, 43.0]
T Rowe Price Media & Telecommunications Fund, Inc | PRMTX | [42.94, 41.82, 44.87, 43.43, 40.17, 38.77, 41.03, 39.37, 36.36, 37.72, 34.16, 33.37, 30.5, 30.03, 28.35, 24.33, 22.32, 23.33, 24.35, 22.74, 25.51, 32.6, 38.18, 37.77, 38.22, 43.39, 42.16, 38.58, 39.26, 39.9, 45.53, 45.36, 48.49, 46.39, 43.57, 44.23, 43.64, 44.02, 40.7, 38.79, 38.24, 39.13, 37.33, 36.81, 35.21, 33.11, 31.76, 30.41, 31.25, 30.97, 32.86, 31.45, 30.43, 30.64, 29.04, 28.6, 27.09, 27.67, 27.05, 26.76, 25.29, 24.61, 23.24, 23.53, 23.95, 23.61, 24.58, 23.41, 21.91, 20.78, 19.66, 20.16, 21.47, 21.08, 20.28, 20.69, 20.71, 20.32, 19.46, 18.38, 17.91, 16.35, 16.53, 15.94, 15.45, 14.95, 13.66, 12.16, 12.03, 12.47, 12.4, 13.42, 11.95, 10.6, 11.45, 10.95, 11.82, 13.92, 13.96, 15.31, 14.84, 15.38, 17.18, 16.45, 15.5, 15.37, 16.13, 18.12, 18.47, 18.29, 18.93, 15.74, 18.03, 21.8, 18.46, 17.71, 21.84, 22.16, 24.87, 23.81]
Fidelity Investment Trust: Fidelity Emerging Markets Fund | FEMKX | [20.75, 21.05, 23.26, 23.09, 21.31, 21.29, 22.61, 21.75, 20.45, 20.78, 18.88, 18.9, 16.96, 17.17, 14.31, 12.44, 11.1, 11.74, 12.85, 11.99, 13.28, 19.5, 24.16, 26.6, 28.76, 31.87, 30.8, 28.41, 30.31, 28.65, 32.78, 32.45, 34.8, 30.77, 27.59, 28.37, 27.08, 26.08, 24.61, 23.43, 22.29, 22.38, 22.6, 21.68, 20.24, 19.2, 19.16, 18.67, 18.35, 18.52, 20.85, 19.39, 18.91, 19.17, 16.95, 15.74, 14.27, 15.16, 13.79, 13.53, 12.58, 12.19, 11.72, 12.05, 12.96, 11.87, 11.71, 11.01, 10.14, 9.88, 9.28, 8.89, 9.18, 9.3, 9.54, 10.47, 10.25, 9.85, 9.52, 8.8, 8.71, 8.09, 8.08, 7.56, 7.15, 6.83, 6.4, 5.92, 6.12, 6.35, 6.4, 6.51, 6.2, 5.91, 6.64, 6.58, 7.09, 7.63, 7.78, 7.7, 7.25, 7.14, 6.88, 6.39, 5.72, 5.44, 6.38, 6.52, 6.95, 7.09, 7.0, 6.63, 7.37, 7.9, 7.05, 6.9, 7.62, 8.18, 9.16, 9.06]
Fidelity Mt Vernon Street Trust: Fidelity Growth Strategies Fund | FDEGX | [16.33, 16.69, 18.18, 17.65, 16.35, 15.42, 16.27, 15.28, 14.34, 15.31, 14.53, 14.0, 13.04, 13.19, 12.55, 11.43, 10.37, 11.06, 11.65, 11.25, 12.35, 15.43, 17.81, 18.6, 19.6, 20.87, 19.74, 18.32, 19.37, 20.11, 22.96, 22.69, 25.04, 23.61, 22.24, 22.34, 22.01, 21.63, 20.83, 19.81, 19.79, 19.79, 19.33, 19.61, 18.52, 17.6, 17.3, 16.65, 17.27, 17.5, 18.86, 18.87, 18.46, 19.04, 17.75, 17.43, 16.79, 17.32, 17.18, 17.14, 16.24, 15.99, 14.94, 15.2, 15.59, 15.86, 16.51, 15.87, 15.25, 15.01, 14.47, 14.6, 15.98, 15.58, 15.25, 15.58, 15.58, 15.19, 14.85, 14.57, 14.24, 13.41, 13.61, 13.1, 12.73, 12.56, 11.7, 11.12, 10.91, 11.07, 11.13, 12.17, 10.62, 9.22, 10.67, 11.06, 11.94, 14.05, 15.06, 16.66, 15.87, 17.66, 18.92, 18.89, 17.07, 14.56, 18.46, 21.42, 24.41, 27.22, 28.13, 23.18, 29.35, 36.65, 35.89, 33.46, 43.41, 48.8, 53.81, 46.18]
Vanguard Fixed Income Securities Funds: Vanguard Intermediate-Term Treasury Fund; Investor Shares | VFITX | [11.62, 11.41, 11.2, 11.09, 11.19, 11.15, 10.93, 11.29, 11.07, 11.04, 10.94, 10.84, 10.78, 10.82, 10.94, 11.14, 10.79, 10.85, 11.12, 10.73, 10.16, 10.3, 10.25, 10.15, 10.07, 9.99, 10.12, 10.34, 10.25, 10.11, 9.81, 9.78, 9.45, 9.38, 9.33, 9.15, 8.99, 9.01, 9.11, 9.06, 9.06, 8.89, 8.92, 9.0, 8.9, 8.85, 8.77, 8.63, 8.52, 8.51, 8.51, 8.54, 8.62, 8.62, 8.64, 8.56, 8.52, 8.58, 8.68, 8.54, 8.66, 8.62, 8.51, 8.37, 8.41, 8.49, 8.45, 8.36, 8.49, 8.41, 8.4, 8.23, 8.15, 8.11, 8.15, 8.42, 8.33, 8.23, 8.17, 8.09, 8.1, 8.21, 7.96, 7.95, 8.27, 8.3, 8.08, 8.06, 8.08, 7.94, 7.97, 7.76, 7.88, 7.93, 7.7, 7.52, 7.32, 7.2, 7.12, 6.94, 7.11, 7.02, 6.98, 7.07, 7.23, 7.08, 6.91, 6.83, 6.66, 6.63, 6.62, 6.69, 6.66, 6.58, 6.49, 6.34, 6.21, 6.15, 6.1, 6.0]
Vanguard Index Funds: Vanguard Total Stock Market Index Fund; Investor Shares | VTSMX | [25.59, 27.25, 29.62, 28.99, 27.28, 26.39, 27.35, 26.59, 25.17, 25.84, 24.8, 23.92, 22.19, 22.11, 20.98, 18.97, 17.46, 19.5, 21.25, 20.87, 22.66, 27.5, 30.31, 29.84, 30.07, 32.76, 32.09, 30.55, 30.73, 31.7, 33.75, 33.96, 35.56, 34.91, 33.7, 33.22, 34.39, 34.97, 33.73, 32.43, 32.07, 32.6, 32.0, 31.64, 30.95, 29.89, 29.23, 28.57, 28.61, 28.56, 29.51, 29.19, 28.67, 28.67, 27.7, 27.67, 26.61, 27.11, 26.89, 27.14, 26.07, 25.86, 24.92, 25.51, 25.97, 25.44, 26.14, 25.22, 24.09, 23.7, 23.29, 23.22, 24.14, 23.64, 23.33, 23.83, 24.09, 23.75, 23.23, 22.24, 21.93, 20.67, 20.91, 20.42, 19.95, 19.67, 18.54, 17.13, 16.95, 17.24, 17.69, 18.78, 17.66, 16.4, 18.24, 18.15, 19.73, 21.23, 21.49, 22.6, 21.65, 22.1, 22.38, 21.99, 20.43, 19.93, 21.9, 23.3, 23.7, 24.1, 23.86, 22.05, 23.65, 26.1, 25.14, 24.71, 27.42, 27.99, 29.36, 27.37]
Vanguard Valley Forge Funds: Vanguard Balanced Index Fund; Investor Shares | VBINX | [18.87, 19.51, 20.43, 20.08, 19.36, 18.96, 19.25, 19.05, 18.34, 18.59, 18.05, 17.59, 16.7, 16.62, 16.04, 15.08, 14.21, 15.2, 16.03, 15.64, 16.2, 18.33, 19.5, 19.26, 19.35, 20.36, 20.16, 19.6, 19.65, 20.0, 20.6, 20.67, 21.08, 20.77, 20.27, 19.99, 20.34, 20.57, 20.19, 19.68, 19.55, 19.62, 19.41, 19.32, 18.97, 18.52, 18.22, 17.86, 17.77, 17.74, 18.1, 18.0, 17.88, 17.85, 17.48, 17.4, 16.96, 17.22, 17.2, 17.21, 16.86, 16.74, 16.29, 16.43, 16.64, 16.48, 16.7, 16.28, 15.88, 15.68, 15.5, 15.34, 15.65, 15.42, 15.32, 15.68, 15.74, 15.54, 15.28, 14.83, 14.69, 14.23, 14.17, 13.94, 13.93, 13.81, 13.24, 12.58, 12.51, 12.56, 12.75, 13.09, 12.63, 12.12, 12.81, 12.69, 13.25, 13.8, 13.86, 14.18, 13.91, 14.03, 14.09, 13.97, 13.47, 13.18, 13.84, 14.28, 14.3, 14.41, 14.29, 13.66, 14.17, 14.97, 14.53, 14.27, 15.08, 15.22, 15.61, 14.88]
Vanguard Index Funds: Vanguard Growth Index Fund; Investor Shares | VIGRX | [27.33, 26.62, 29.02, 28.58, 26.99, 26.01, 27.26, 26.37, 24.92, 25.27, 24.17, 23.71, 22.14, 21.83, 20.91, 19.15, 17.68, 19.08, 20.0, 19.77, 21.62, 26.27, 29.67, 29.32, 29.87, 32.02, 30.89, 29.19, 29.43, 29.85, 32.43, 32.37, 33.49, 32.44, 31.11, 30.6, 31.09, 31.47, 30.42, 29.15, 28.99, 29.58, 28.81, 28.77, 28.15, 27.22, 26.46, 25.69, 26.22, 26.32, 27.29, 27.3, 26.91, 27.08, 26.43, 26.54, 25.44, 25.66, 25.58, 25.91, 24.77, 24.81, 23.67, 24.25, 24.66, 24.38, 25.15, 24.24, 23.34, 22.99, 22.68, 22.83, 24.16, 23.9, 23.45, 23.81, 24.19, 23.98, 23.46, 22.78, 22.58, 21.26, 21.63, 21.14, 20.6, 20.35, 19.71, 18.46, 18.1, 18.15, 18.63, 20.02, 19.0, 17.4, 19.42, 19.3, 20.26, 22.02, 22.47, 24.2, 23.65, 24.37, 24.4, 24.38, 22.39, 21.61, 23.17, 24.84, 24.91, 25.26, 25.2, 23.14, 25.44, 28.84, 28.04, 29.35, 32.85, 33.73, 37.39, 35.35]
Vanguard International Equity Index Funds: Emerging Markets Stock Index Fund; Investor Shares | VEIEX | [24.12, 24.13, 26.61, 26.54, 24.54, 24.28, 25.91, 25.0, 23.61, 23.93, 21.9, 22.03, 19.75, 20.2, 17.1, 14.73, 12.69, 13.51, 14.72, 13.6, 14.76, 20.41, 24.36, 26.42, 27.57, 30.75, 30.21, 27.95, 29.05, 27.76, 31.22, 31.32, 34.04, 30.31, 27.37, 27.64, 26.49, 25.35, 23.93, 22.95, 22.05, 22.33, 22.46, 21.57, 20.07, 19.16, 19.02, 18.64, 18.43, 18.46, 20.68, 19.3, 19.07, 19.35, 17.36, 16.35, 15.14, 16.21, 14.92, 14.78, 13.83, 13.39, 12.95, 13.33, 14.29, 13.13, 13.15, 12.48, 11.33, 11.07, 10.48, 10.07, 10.26, 10.26, 10.35, 11.24, 11.2, 10.75, 10.42, 9.67, 9.57, 8.77, 8.7, 8.18, 7.64, 7.22, 6.78, 6.24, 6.37, 6.62, 6.61, 6.79, 6.38, 5.99, 6.71, 6.61, 7.23, 7.87, 7.91, 7.88, 7.54, 7.35, 7.14, 6.63, 6.06, 5.69, 6.73, 6.8, 7.29, 7.46, 7.34, 6.72, 7.5, 8.21, 7.35, 6.93, 7.69, 8.33, 8.88, 8.74]
Vanguard STAR Funds: Vanguard Total International Stock Index Fund; Investor Shares | VGTSX | [12.68, 12.83, 14.38, 14.63, 13.71, 13.68, 14.41, 14.19, 13.68, 13.97, 13.27, 12.84, 11.67, 11.83, 10.34, 9.17, 8.39, 9.28, 10.54, 9.74, 10.39, 13.34, 15.35, 16.17, 16.79, 18.45, 18.17, 17.17, 17.29, 17.23, 18.84, 19.29, 20.21, 19.08, 17.94, 18.07, 18.26, 18.15, 17.61, 16.94, 16.48, 16.47, 16.31, 15.82, 15.26, 14.67, 14.63, 14.27, 14.11, 14.16, 14.82, 14.1, 13.67, 13.77, 12.88, 12.25, 11.93, 12.35, 11.79, 11.47, 11.06, 10.92, 10.91, 11.14, 11.47, 10.96, 11.15, 10.67, 9.95, 9.64, 9.36, 9.29, 9.62, 9.39, 9.35, 9.65, 9.61, 9.37, 9.23, 8.56, 8.38, 7.87, 7.65, 7.47, 7.24, 7.05, 6.64, 6.05, 6.17, 6.29, 6.5, 6.67, 6.39, 6.04, 6.78, 6.79, 7.53, 7.87, 7.78, 7.74, 7.32, 7.26, 7.61, 7.51, 7.25, 7.04, 7.89, 8.07, 8.27, 8.6, 8.92, 8.27, 8.9, 9.64, 9.53, 9.19, 9.62, 9.92, 10.44, 10.34]
Schwab Capital Trust: Schwab Small-Cap Index Fund; Select Shares | SWSSX | [18.07, 18.0, 19.51, 18.42, 16.96, 16.26, 16.78, 15.53, 15.0, 16.01, 15.1, 14.53, 13.19, 13.04, 12.56, 10.5, 9.59, 11.0, 12.37, 11.75, 13.39, 16.9, 18.4, 17.65, 17.19, 19.04, 18.27, 17.37, 17.36, 17.88, 19.02, 19.24, 20.56, 20.03, 19.76, 19.41, 20.68, 21.0, 20.13, 19.7, 19.42, 19.48, 19.03, 21.44, 20.84, 19.74, 19.53, 19.08, 19.7, 19.67, 20.68, 20.6, 19.77, 19.88, 18.4, 18.52, 17.7, 18.25, 18.17, 18.52, 17.45, 16.88, 15.78, 16.72, 17.21, 16.88, 17.55, 17.03, 15.68, 15.37, 14.61, 14.72, 15.77, 15.07, 14.82, 15.6, 15.54, 15.48, 15.05, 14.84, 14.34, 13.24, 13.52, 12.89, 12.25, 12.03, 10.87, 9.84, 9.72, 10.05, 10.56, 11.34, 10.43, 10.15, 10.86, 10.8, 12.51, 13.2, 13.83, 13.9, 12.79, 13.26, 13.75, 13.5, 12.57, 11.96, 13.93, 14.33, 15.0, 14.36, 13.99, 12.95, 13.56, 14.67, 14.43, 14.99, 16.57, 16.86, 17.38, 15.8]
Vanguard Specialized Funds: Vanguard REIT Index Fund; Investor Shares | VGSIX | [15.42, 16.42, 17.36, 16.22, 14.72, 13.95, 14.73, 13.76, 12.88, 13.51, 12.67, 11.11, 10.04, 10.38, 10.14, 7.72, 7.46, 9.41, 11.39, 9.7, 12.67, 18.42, 18.44, 18.03, 17.48, 19.6, 19.57, 18.48, 17.36, 18.03, 18.1, 19.07, 21.02, 20.77, 19.92, 18.71, 20.29, 22.36, 22.38, 22.39, 22.94, 23.5, 21.66, 22.06, 21.07, 19.86, 19.49, 18.79, 18.16, 17.24, 17.74, 18.41, 17.56, 17.24, 16.04, 16.05, 15.4, 15.77, 15.68, 16.29, 15.23, 14.51, 14.05, 13.28, 13.49, 13.12, 14.33, 13.67, 13.13, 12.45, 12.48, 11.58, 11.52, 11.2, 10.46, 12.24, 11.62, 11.43, 10.96, 10.63, 10.19, 10.03, 9.7, 9.64, 9.16, 8.96, 8.49, 8.16, 8.0, 7.86, 8.08, 8.02, 7.67, 8.07, 8.37, 8.35, 8.82, 8.58, 8.47, 8.42, 7.92, 7.77, 7.79, 7.6, 7.18, 7.44, 7.74, 7.47, 7.63, 7.21, 7.06, 6.9, 6.84, 6.96, 6.93, 6.49, 6.38, 6.69, 6.49, 6.76]| Report Duplicate | Flag | PURGE
Future Advisor Software Engineer / Developer Algorithm
your response is more rubbish than dhaval0129 question. Please show some respect to this portal and dont use this kind of language.
- Anonymous July 28, 2011Ques. isn't that hard..
it asks for max. as well as min. change in percentage of the stock values over a period of time.
I wud suggest u following approach:
1. Since these data are stored in a text file, read the contents using file pointer.
2. It sud be easy for u to get the compny's prices in an array keeping a track of which compny this array coresponds to.
3. For eg. look at this data: 20, 30, 10, 5, 40, 100, 1, 90, 90
u r reqd to find max. percntge change
4. This is likely to occur when differnce between 2 values is largest i.e. (5-100) diffence = 95. but %ge chnge is 1900%. Also look at (1-90) diff = 89, but %ge chnge = 8900%. similar approach for min. burst can b taken.
5.so u hv to basically store "some" min and max val. from the array along wid their index(i.e. period of occurence) and see which one gives u the max burst %ge.
6. in step 5 index is useful to keep track whether the min val. occurs b4 max or vice versa...a bit of logic is reqd. jst here and choosing the value of "some" in step 4. rest seems easy, :)
What shit is this!
- Mr.4342 July 26, 2011