Question: Project Part 1 : Brute Force Approach Implement a brute force algorithm to exhaustively search all possible asset allocations within the given investment amount. Evaluate
Project Part : Brute Force Approach
Implement a brute force algorithm to exhaustively search all possible asset allocations within the given investment amount. Evaluate the return and risk of each allocation and find the one that maximizes the expected return while keeping the risk within the specified tolerance level.
Deliverables
The source code for the implementation of the two algorithms BF Dynamic program ming in JAVA.
A report that includes the following sections: Cover page
For each design paradigm, write the pseudocode of the algorithm that finds the composition of an optimal allocation of assets.
For the dynamic programming approach, the composition should be obtained from the table generated during the algorithms execution.
For the dynamic programming approach, write the recurrence function.
For each of the two algorithms, provide the best and worst time complexity of your solutions. Present the complexities on a table and argue with examples to demon strate the cases.
Experimental results demonstrating the performance of the algorithms for various portfolio sizes and investment amounts.
Screenshots of the complete code and sample run.
Source code in Courier New with font size: with comments.
Describe challenges faced and how you tackled them
Student peer evaluation form see Team Work Evaluation table below Use meaningful variable names in your code.
Sample run:
Input will be in the form of a text file your program should read. The input has the following format:
IDofasset : Expectedreturn : Risklevel : Quantity
Example.txt:
Example :
AAPL : : : GOOGL : : : MSFT : : :
Example :
AMZN : : : TSLA : : : FB : : :
Output Sample:
Example : Optimal Allocation: AAPL: units
GOOGL: units
MSFT: units
Expected Portfolio Return: Portfolio Risk Level:
Example :
Optimal Allocation: AMZN: units TSLA: units FB: units
Expected Portfolio Return: Portfolio Risk Level: IDofasset : Expectedreturn : Risklevel : Quantity
Example.txt:
Example :
AAPL : ::
GOOGL : ::
MSFT : ::
Example :
AMZN : ::
TSLA : ::
FB :::
Output Sample:
Example : Optimal Allocation:
AAPL: units
GOOGL: units
MSFT: units
Expected Portfolio Return:
Portfolio Risk Level:
Example :
Optimal Allocation:
AMZN: units
TSLA: units
FB: units
Expected Portfolio Return:
Portfolio Risk Level:
Optimal Portfolio Allocation
Problem Statement:
You work for a prestigious investment firm that manages a large number of clients' portfolios.
Your task is to develop a program that determines the optimal allocation of assets in a given
investment portfolio.
The portfolio consists of different assets, each with an associated expected return and
risk level. Your program should take as input the expected return and risk of each asset, along
with the total investment amount available. The goal is to find the allocation of assets that
maximizes the portfolio's expected return while keeping the risk within a specified tolerance
level.
Your program should solve this problem using two different algorithm paradigms: Brute
Force and Dynamic Programming.
Project Part : Brute Force Approach
Implement a brute force algorithm to exhaustively search all possible asset allocations within
the given investment amount. Evaluate the return and risk of each allocation and find the one
that maximizes the expected return while keeping the risk within the specified tolerance level.
Project Part : Dynamic Programming Approach:
Design and implement a dynamic programming algorithm that efficiently computes the optimal
allocation of assets. Your algorithm should make use of the principle of optimality to break
down the problem into smaller subproblems and avoid redundant computations. Your program
should output the optimal allocation of assets, along with the corresponding expected return
and risk. Additionally, you should compare the runtime and efficiency of the two implemented
algorithms for different portfolio sizes and investment amounts. Note: You are not allowed to
use existing optimization libraries or functions readily available online. The purpose of this
project is to develop a deep understanding of the algorithmic paradigms and their application
in solving realworld problems.
Deliverables
The source code for the implementation of the two algorithms BF Dynamic program
ming in JAVA.
A report that includes the following sections:
Cover page
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
