首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
代写data编程、代做Java程序语言
项目预算:
开发周期:
发布时间:
要求地区:
Big Data (H/M) Assessed Exercise Task Sheet
2024/25 – Individual – v1 07/02/25
Summary
The goal of this exercise is to familiarize yourselves with the design, implementation and
performance testing of Big Data analysis tasks using Apache Spark. You will be required to design
and implement a single reasonably complex Spark application. You will then test the running of this
application on a large dataset. You will be evaluated based on code functionality (does it produce
the expected outcome), code quality (is it well designed and follows good software engineering
practices) and efficiency (how fast is it and does it use resources efficiently). We provide you with an
initial project template similar to the tutorials that you have been using in the labs. This will contain
some classes that you can use in your solution (so you don’t need to implement them yourself).
Task Description
You are to develop a financial recommendation platform that can find profitable financial assets and
display them as a top-5 ranking for an investor, given pricing information and asset fundamental
data. This is a batch analytics task to be implemented in Apache Spark as a pipeline of data
transformations and actions. You will be provided a dataset that contains both pricing data and asset
metadata up-to a set date, where this is the date that you are going to produce recommendations
for, using information on and before that date. The pipeline you need to implement will involve a
series of stages:
1. First, the pricing data and asset metadata needs to be loaded in as Resilient Distributed Datasets
(RDDs), this is provided for you in the project template.
2. Second, you will need to transform the daily pricing data into a series of financial ‘Technical
Indicators’ that numerically describe how well an asset performed in the past. Classes for
calculating these are provided, but you will need to work out how to integrate these into your
pipeline of Spark transformations.
3. Third, after you have calculated these technical indicators, you will need to use them to filter
the assets. You should filter out any assets that have a Volatility score greater than or equal to
4.
4. Fourth, you will need to further use the provided asset metadata to further filter the asset set to
remove assets with a Price-to-Earnings Ratio greater than or equal to 25.
5. Finally, you need to rank the remaining assets for the investor based on asset Returns (Return
on Investment) over the most recent 5 days, returning the top 5 assets.
What you need to collect at the driver program is an AssetRanking class, which contains an array of 5
Asset objects (i.e. the final ranking), both these classes are provided in the template. All computation
should be performed in a distributed manner using Spark transformations and actions. You may
need to collect intermediate data at the driver program between stages of your pipeline, but this
should only be a small number of records (under 5k), and you should not need to further process the
data at the driver.
For this exercise, you should implement your transformation functions as Java classes following
object-orientated design principles, as illustrated in the tutorials. You can use both the Java core API
(those based on JavaRDD) and the Java SQL API (those based on Dataset), but you should avoid
significant use of lambda expressions (as they make your code less interpretable). You should
comment the logic for your code in English; have a look at the tutorial code bases for what this might
look like.
Template Classes
You will be provided with a Java template project
like the tutorials. The template project provides
implementations of the following code to help you:
• AssessedExercise: This is the main class,
you should call all of your transformations
and actions within the rankInvestments
function of this class.
• Asset: This class represents a single asset,
it is used by AssetRanking, which is the
object your program is to return.
• AssetFeatures: This class holds the
returns, volatility and p/e ratio for an
asset. This class is used by Asset.
• AssetMetadata: This object contains
descriptive metadata about an asset. You
will need the name, industry, sector and
price-to-earnings ratio from this in your
solution.
• AssetRanking: An array of Asset, your
solution should return one of these with 5
assets.
• StockPrice: This class represents the price
data for an asset on a particular day. You
need the closing price from these to
calculate technical indicators.
• Returns: This is a class for calculating
Return on Investment. The calculate
function takes in a number of days to
calculate over and a list of close prices
sorted by time. numDays should be 5 in
your solution.
• Volatility: This is a class for calculating asset volatility over a period of time. It takes in a list
of close prices sorted by time. For your solution you need to provide it the close prices for
the prior year, which is 251 days (we only count trading days since markets are not open on
weekends).
• NullPriceFilter: This is a simple filtering class that is run on price loading to remove days
where close prices are missing.
• PriceReaderMap: A simple map that is used to convert from a Spark SQL Row to a
StockPrice.
• AssetMetadataPairing: This is a Spark SQL Row map that converts the raw asset metadata
to a Tuple2
object. The string in this case is the stock ticker/symbol
for the asset.
• MathUtils: This is a utility class that includes some useful math operations. You don’t need
to directly use this, it is used by the Returns and Volatility classes.
• TimeUtil: This is a custom utility class I wrote to make parsing dates easier. In the above
requirements, you will note that for calculating returns and volatility you will need to filter
the input pricing data to a window of time, but the StockPrice object reports the date in the
form of
fields. This class allows you to convert from
to
a Java Instant object, which allows for easier time-based operations.
IDE Setup
Your integrated development environment (e.g. Eclipse or IntelliJ) should be the same as for the
tutorials. However, as this is using the latest version of Apache Spark (4.0.0-preview2) you will need
Java JDK 21.0.2, which you can download from https://jdk.java.net/archive/
Dataset
The dataset that you will be using for this exercise is a collection of financial assets from the US stock
market spanning the period of 1999 to mid-2020. This is split over two data files:
• all_prices-noHead.csv: This file contains daily pricing data for around 15,700 financial assets
over multiple years. The file contains 24,197,442 price points, and is around 2.4GB in size.
• stock_data.json: This is a json file that contains metadata collected about various financial
assets, such as their name, industry and price-to-earnings ratio. Not all fields are available
for all assets. If you need a field for your solution and an asset is missing that field you
should filter that asset out.
When and What to hand in
The deadline for submission is March 3rd by 4:30pm. You should submit via Moodle:
• A copy of your code-base as a single zip file. You should only include the ‘src’ directory in your
submission.
How this exercise will be marked
Following timely submission on Moodle, the exercise will be given a numerical mark between 0 (no
submission) and 25 (perfect in every way). The numerical marks will then be converted to a band (A5,
A4, etc.). The marking scheme is as follows:
• 5 marks are awarded for producing the correct output through computation
• 5 marks are awarded for computational efficiency (benchmarked against my solution)
• The remaining 15 marks are awarded for the implementation quality
o 10 marks are awarded for correct implementation of the classes
o 2 marks are awarded for code documentation (comments).
o 3 marks are awarded for design that will make yoursolution scale well with more data
Frequently Asked Questions…
• Is my solution fast enough? This is a difficult question to answer, as I have a solution that I
have implemented, but how that compares to your implementation is impossible to say
without running a test on like-for-like hardware. What I can say is that my solution
completed in 31 seconds running on an I7-12700, where data was reading from an SSD and
the number of threads that the executor was provided with was four (local[4])
• What are you looking for in terms of efficiency?: We are looking at the statistics from the
Spark executor dashboard, here is mine for reference:
• How do I know if I got the right answer? The short answer is you don’t, and I can’t give you
the full output, as that is marked, however I can say that the rank one asset my solution
produces is TOP Ships Inc (TOPS).
• Can I use
: No, you have to write in Java to enable fair
marking of the exercise.
• Can I use an AI assistant to help?: Also no, see
https://www.gla.ac.uk/myglasgow/sld/ai/students/
• Can I ask for help in the labs?: Yes! That is what we are there for, we can’t tell you the
solution, but we can provide hints and guidance.
Big Data (H/M) Assessed Exercise Task Sheet
2024/25 – Individual – v1 07/02/25
Summary
The goal of this exercise is to familiarize yourselves with the design, implementation and
performance testing of Big Data analysis tasks using Apache Spark. You will be required to design
and implement a single reasonably complex Spark application. You will then test the running of this
application on a large dataset. You will be evaluated based on code functionality (does it produce
the expected outcome), code quality (is it well designed and follows good software engineering
practices) and efficiency (how fast is it and does it use resources efficiently). We provide you with an
initial project template similar to the tutorials that you have been using in the labs. This will contain
some classes that you can use in your solution (so you don’t need to implement them yourself).
Task Description
You are to develop a financial recommendation platform that can find profitable financial assets and
display them as a top-5 ranking for an investor, given pricing information and asset fundamental
data. This is a batch analytics task to be implemented in Apache Spark as a pipeline of data
transformations and actions. You will be provided a dataset that contains both pricing data and asset
metadata up-to a set date, where this is the date that you are going to produce recommendations
for, using information on and before that date. The pipeline you need to implement will involve a
series of stages:
1. First, the pricing data and asset metadata needs to be loaded in as Resilient Distributed Datasets
(RDDs), this is provided for you in the project template.
2. Second, you will need to transform the daily pricing data into a series of financial ‘Technical
Indicators’ that numerically describe how well an asset performed in the past. Classes for
calculating these are provided, but you will need to work out how to integrate these into your
pipeline of Spark transformations.
3. Third, after you have calculated these technical indicators, you will need to use them to filter
the assets. You should filter out any assets that have a Volatility score greater than or equal to
4.
4. Fourth, you will need to further use the provided asset metadata to further filter the asset set to
remove assets with a Price-to-Earnings Ratio greater than or equal to 25.
5. Finally, you need to rank the remaining assets for the investor based on asset Returns (Return
on Investment) over the most recent 5 days, returning the top 5 assets.
What you need to collect at the driver program is an AssetRanking class, which contains an array of 5
Asset objects (i.e. the final ranking), both these classes are provided in the template. All computation
should be performed in a distributed manner using Spark transformations and actions. You may
need to collect intermediate data at the driver program between stages of your pipeline, but this
should only be a small number of records (under 5k), and you should not need to further process the
data at the driver.
For this exercise, you should implement your transformation functions as Java classes following
object-orientated design principles, as illustrated in the tutorials. You can use both the Java core API
(those based on JavaRDD) and the Java SQL API (those based on Dataset), but you should avoid
significant use of lambda expressions (as they make your code less interpretable). You should
comment the logic for your code in English; have a look at the tutorial code bases for what this might
look like.
Template Classes
You will be provided with a Java template project
like the tutorials. The template project provides
implementations of the following code to help you:
• AssessedExercise: This is the main class,
you should call all of your transformations
and actions within the rankInvestments
function of this class.
• Asset: This class represents a single asset,
it is used by AssetRanking, which is the
object your program is to return.
• AssetFeatures: This class holds the
returns, volatility and p/e ratio for an
asset. This class is used by Asset.
• AssetMetadata: This object contains
descriptive metadata about an asset. You
will need the name, industry, sector and
price-to-earnings ratio from this in your
solution.
• AssetRanking: An array of Asset, your
solution should return one of these with 5
assets.
• StockPrice: This class represents the price
data for an asset on a particular day. You
need the closing price from these to
calculate technical indicators.
• Returns: This is a class for calculating
Return on Investment. The calculate
function takes in a number of days to
calculate over and a list of close prices
sorted by time. numDays should be 5 in
your solution.
• Volatility: This is a class for calculating asset volatility over a period of time. It takes in a list
of close prices sorted by time. For your solution you need to provide it the close prices for
the prior year, which is 251 days (we only count trading days since markets are not open on
weekends).
• NullPriceFilter: This is a simple filtering class that is run on price loading to remove days
where close prices are missing.
• PriceReaderMap: A simple map that is used to convert from a Spark SQL Row to a
StockPrice.
• AssetMetadataPairing: This is a Spark SQL Row map that converts the raw asset metadata
to a Tuple2
object. The string in this case is the stock ticker/symbol
for the asset.
• MathUtils: This is a utility class that includes some useful math operations. You don’t need
to directly use this, it is used by the Returns and Volatility classes.
• TimeUtil: This is a custom utility class I wrote to make parsing dates easier. In the above
requirements, you will note that for calculating returns and volatility you will need to filter
the input pricing data to a window of time, but the StockPrice object reports the date in the
form of
fields. This class allows you to convert from
to
a Java Instant object, which allows for easier time-based operations.
IDE Setup
Your integrated development environment (e.g. Eclipse or IntelliJ) should be the same as for the
tutorials. However, as this is using the latest version of Apache Spark (4.0.0-preview2) you will need
Java JDK 21.0.2, which you can download from https://jdk.java.net/archive/
Dataset
The dataset that you will be using for this exercise is a collection of financial assets from the US stock
market spanning the period of 1999 to mid-2020. This is split over two data files:
• all_prices-noHead.csv: This file contains daily pricing data for around 15,700 financial assets
over multiple years. The file contains 24,197,442 price points, and is around 2.4GB in size.
• stock_data.json: This is a json file that contains metadata collected about various financial
assets, such as their name, industry and price-to-earnings ratio. Not all fields are available
for all assets. If you need a field for your solution and an asset is missing that field you
should filter that asset out.
When and What to hand in
The deadline for submission is March 3rd by 4:30pm. You should submit via Moodle:
• A copy of your code-base as a single zip file. You should only include the ‘src’ directory in your
submission.
How this exercise will be marked
Following timely submission on Moodle, the exercise will be given a numerical mark between 0 (no
submission) and 25 (perfect in every way). The numerical marks will then be converted to a band (A5,
A4, etc.). The marking scheme is as follows:
• 5 marks are awarded for producing the correct output through computation
• 5 marks are awarded for computational efficiency (benchmarked against my solution)
• The remaining 15 marks are awarded for the implementation quality
o 10 marks are awarded for correct implementation of the classes
o 2 marks are awarded for code documentation (comments).
o 3 marks are awarded for design that will make yoursolution scale well with more data
Frequently Asked Questions…
• Is my solution fast enough? This is a difficult question to answer, as I have a solution that I
have implemented, but how that compares to your implementation is impossible to say
without running a test on like-for-like hardware. What I can say is that my solution
completed in 31 seconds running on an I7-12700, where data was reading from an SSD and
the number of threads that the executor was provided with was four (local[4])
• What are you looking for in terms of efficiency?: We are looking at the statistics from the
Spark executor dashboard, here is mine for reference:
• How do I know if I got the right answer? The short answer is you don’t, and I can’t give you
the full output, as that is marked, however I can say that the rank one asset my solution
produces is TOP Ships Inc (TOPS).
• Can I use
: No, you have to write in Java to enable fair
marking of the exercise.
• Can I use an AI assistant to help?: Also no, see
https://www.gla.ac.uk/myglasgow/sld/ai/students/
• Can I ask for help in the labs?: Yes! That is what we are there for, we can’t tell you the
solution, but we can provide hints and guidance.
Big Data (H/M) Assessed Exercise Task Sheet
2024/25 – Individual – v1 07/02/25
Summary
The goal of this exercise is to familiarize yourselves with the design, implementation and
performance testing of Big Data analysis tasks using Apache Spark. You will be required to design
and implement a single reasonably complex Spark application. You will then test the running of this
application on a large dataset. You will be evaluated based on code functionality (does it produce
the expected outcome), code quality (is it well designed and follows good software engineering
practices) and efficiency (how fast is it and does it use resources efficiently). We provide you with an
initial project template similar to the tutorials that you have been using in the labs. This will contain
some classes that you can use in your solution (so you don’t need to implement them yourself).
Task Description
You are to develop a financial recommendation platform that can find profitable financial assets and
display them as a top-5 ranking for an investor, given pricing information and asset fundamental
data. This is a batch analytics task to be implemented in Apache Spark as a pipeline of data
transformations and actions. You will be provided a dataset that contains both pricing data and asset
metadata up-to a set date, where this is the date that you are going to produce recommendations
for, using information on and before that date. The pipeline you need to implement will involve a
series of stages:
1. First, the pricing data and asset metadata needs to be loaded in as Resilient Distributed Datasets
(RDDs), this is provided for you in the project template.
2. Second, you will need to transform the daily pricing data into a series of financial ‘Technical
Indicators’ that numerically describe how well an asset performed in the past. Classes for
calculating these are provided, but you will need to work out how to integrate these into your
pipeline of Spark transformations.
3. Third, after you have calculated these technical indicators, you will need to use them to filter
the assets. You should filter out any assets that have a Volatility score greater than or equal to
4.
4. Fourth, you will need to further use the provided asset metadata to further filter the asset set to
remove assets with a Price-to-Earnings Ratio greater than or equal to 25.
5. Finally, you need to rank the remaining assets for the investor based on asset Returns (Return
on Investment) over the most recent 5 days, returning the top 5 assets.
What you need to collect at the driver program is an AssetRanking class, which contains an array of 5
Asset objects (i.e. the final ranking), both these classes are provided in the template. All computation
should be performed in a distributed manner using Spark transformations and actions. You may
need to collect intermediate data at the driver program between stages of your pipeline, but this
should only be a small number of records (under 5k), and you should not need to further process the
data at the driver.
For this exercise, you should implement your transformation functions as Java classes following
object-orientated design principles, as illustrated in the tutorials. You can use both the Java core API
(those based on JavaRDD) and the Java SQL API (those based on Dataset), but you should avoid
significant use of lambda expressions (as they make your code less interpretable). You should
comment the logic for your code in English; have a look at the tutorial code bases for what this might
look like.
Template Classes
You will be provided with a Java template project
like the tutorials. The template project provides
implementations of the following code to help you:
• AssessedExercise: This is the main class,
you should call all of your transformations
and actions within the rankInvestments
function of this class.
• Asset: This class represents a single asset,
it is used by AssetRanking, which is the
object your program is to return.
• AssetFeatures: This class holds the
returns, volatility and p/e ratio for an
asset. This class is used by Asset.
• AssetMetadata: This object contains
descriptive metadata about an asset. You
will need the name, industry, sector and
price-to-earnings ratio from this in your
solution.
• AssetRanking: An array of Asset, your
solution should return one of these with 5
assets.
• StockPrice: This class represents the price
data for an asset on a particular day. You
need the closing price from these to
calculate technical indicators.
• Returns: This is a class for calculating
Return on Investment. The calculate
function takes in a number of days to
calculate over and a list of close prices
sorted by time. numDays should be 5 in
your solution.
• Volatility: This is a class for calculating asset volatility over a period of time. It takes in a list
of close prices sorted by time. For your solution you need to provide it the close prices for
the prior year, which is 251 days (we only count trading days since markets are not open on
weekends).
• NullPriceFilter: This is a simple filtering class that is run on price loading to remove days
where close prices are missing.
• PriceReaderMap: A simple map that is used to convert from a Spark SQL Row to a
StockPrice.
• AssetMetadataPairing: This is a Spark SQL Row map that converts the raw asset metadata
to a Tuple2
object. The string in this case is the stock ticker/symbol
for the asset.
• MathUtils: This is a utility class that includes some useful math operations. You don’t need
to directly use this, it is used by the Returns and Volatility classes.
• TimeUtil: This is a custom utility class I wrote to make parsing dates easier. In the above
requirements, you will note that for calculating returns and volatility you will need to filter
the input pricing data to a window of time, but the StockPrice object reports the date in the
form of
fields. This class allows you to convert from
to
a Java Instant object, which allows for easier time-based operations.
IDE Setup
Your integrated development environment (e.g. Eclipse or IntelliJ) should be the same as for the
tutorials. However, as this is using the latest version of Apache Spark (4.0.0-preview2) you will need
Java JDK 21.0.2, which you can download from https://jdk.java.net/archive/
Dataset
The dataset that you will be using for this exercise is a collection of financial assets from the US stock
market spanning the period of 1999 to mid-2020. This is split over two data files:
• all_prices-noHead.csv: This file contains daily pricing data for around 15,700 financial assets
over multiple years. The file contains 24,197,442 price points, and is around 2.4GB in size.
• stock_data.json: This is a json file that contains metadata collected about various financial
assets, such as their name, industry and price-to-earnings ratio. Not all fields are available
for all assets. If you need a field for your solution and an asset is missing that field you
should filter that asset out.
When and What to hand in
The deadline for submission is March 3rd by 4:30pm. You should submit via Moodle:
• A copy of your code-base as a single zip file. You should only include the ‘src’ directory in your
submission.
How this exercise will be marked
Following timely submission on Moodle, the exercise will be given a numerical mark between 0 (no
submission) and 25 (perfect in every way). The numerical marks will then be converted to a band (A5,
A4, etc.). The marking scheme is as follows:
• 5 marks are awarded for producing the correct output through computation
• 5 marks are awarded for computational efficiency (benchmarked against my solution)
• The remaining 15 marks are awarded for the implementation quality
o 10 marks are awarded for correct implementation of the classes
o 2 marks are awarded for code documentation (comments).
o 3 marks are awarded for design that will make yoursolution scale well with more data
Frequently Asked Questions…
• Is my solution fast enough? This is a difficult question to answer, as I have a solution that I
have implemented, but how that compares to your implementation is impossible to say
without running a test on like-for-like hardware. What I can say is that my solution
completed in 31 seconds running on an I7-12700, where data was reading from an SSD and
the number of threads that the executor was provided with was four (local[4])
• What are you looking for in terms of efficiency?: We are looking at the statistics from the
Spark executor dashboard, here is mine for reference:
• How do I know if I got the right answer? The short answer is you don’t, and I can’t give you
the full output, as that is marked, however I can say that the rank one asset my solution
produces is TOP Ships Inc (TOPS).
• Can I use
: No, you have to write in Java to enable fair
marking of the exercise.
• Can I use an AI assistant to help?: Also no, see
https://www.gla.ac.uk/myglasgow/sld/ai/students/
• Can I ask for help in the labs?: Yes! That is what we are there for, we can’t tell you the
solution, but we can provide hints and guidance.
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
代写se360、java/python程序代...
2025-03-08
代写program、java/python程序...
2025-03-08
代做java lab22: sockets调试j...
2025-03-08
代写eecs31l introduction to ...
2025-03-08
代写ceg8526: hydrosystems mo...
2025-03-08
代做are 136 guidelines for f...
2025-03-08
代写educ7053 essay questions...
2025-03-08
代写ec-2565 economics for bu...
2025-03-08
代做market investment代写c/c...
2025-03-08
代写dig103: interaction desi...
2025-03-08
代写beam065 bank management ...
2025-03-08
代做homework: analysis of th...
2025-03-08
代写cs 338 - winter 2025 ass...
2025-03-08
热点标签
mktg2509
csci 2600
38170
lng302
csse3010
phas3226
77938
arch1162
engn4536/engn6536
acx5903
comp151101
phl245
cse12
comp9312
stat3016/6016
phas0038
comp2140
6qqmb312
xjco3011
rest0005
ematm0051
5qqmn219
lubs5062m
eee8155
cege0100
eap033
artd1109
mat246
etc3430
ecmm462
mis102
inft6800
ddes9903
comp6521
comp9517
comp3331/9331
comp4337
comp6008
comp9414
bu.231.790.81
man00150m
csb352h
math1041
eengm4100
isys1002
08
6057cem
mktg3504
mthm036
mtrx1701
mth3241
eeee3086
cmp-7038b
cmp-7000a
ints4010
econ2151
infs5710
fins5516
fin3309
fins5510
gsoe9340
math2007
math2036
soee5010
mark3088
infs3605
elec9714
comp2271
ma214
comp2211
infs3604
600426
sit254
acct3091
bbt405
msin0116
com107/com113
mark5826
sit120
comp9021
eco2101
eeen40700
cs253
ece3114
ecmm447
chns3000
math377
itd102
comp9444
comp(2041|9044)
econ0060
econ7230
mgt001371
ecs-323
cs6250
mgdi60012
mdia2012
comm221001
comm5000
ma1008
engl642
econ241
com333
math367
mis201
nbs-7041x
meek16104
econ2003
comm1190
mbas902
comp-1027
dpst1091
comp7315
eppd1033
m06
ee3025
msci231
bb113/bbs1063
fc709
comp3425
comp9417
econ42915
cb9101
math1102e
chme0017
fc307
mkt60104
5522usst
litr1-uc6201.200
ee1102
cosc2803
math39512
omp9727
int2067/int5051
bsb151
mgt253
fc021
babs2202
mis2002s
phya21
18-213
cege0012
mdia1002
math38032
mech5125
07
cisc102
mgx3110
cs240
11175
fin3020s
eco3420
ictten622
comp9727
cpt111
de114102d
mgm320h5s
bafi1019
math21112
efim20036
mn-3503
fins5568
110.807
bcpm000028
info6030
bma0092
bcpm0054
math20212
ce335
cs365
cenv6141
ftec5580
math2010
ec3450
comm1170
ecmt1010
csci-ua.0480-003
econ12-200
ib3960
ectb60h3f
cs247—assignment
tk3163
ics3u
ib3j80
comp20008
comp9334
eppd1063
acct2343
cct109
isys1055/3412
math350-real
math2014
eec180
stat141b
econ2101
msinm014/msing014/msing014b
fit2004
comp643
bu1002
cm2030
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!