I made a Stock graph which uses the fibonacci retractment lines to show the growth over time and help predict using the slope line drawn for the future. The use of fibonacci helps identify potential turning points in stock prices. This strategic application allows us to uncover hidden patterns and anticipate market movements with a higher degree of accuracy.
Helped working with the stocks API to help create the instance variables needed and setting up the SQlite for the respective APIs being used.
We also made a bubble sort method for the Monthly Stocks to sort the 'high' values for the data by monthly in order of greatest to least to help analyze which month had the greatest increase in price to help make better analysis and trends.
Aditya's Commits
Daily stocks data API
Monthly stocks data API
SQLITE many-to-one relationship to connect monthly and daily data api's for fibonacci sorting
Rohin's Commits
Worked on setting up the FIbonacci Retracement in the backend and optimizing algorithms
// Stores state throughout all calls
private static Map<Integer, Integer> memo = new HashMap<>();
// Ideally O(n) Time & O(n) Space
public static int fibonacci(int n) {
// Base case: if n is 0 or 1, return n
if (n <= 1) {
return n;
}
// Check if the result for the current value of n is already memoized
if (memo.containsKey(n)) {
// Return the memoized result to avoid redundant calculations
return memo.get(n);
}
// Recursive calculation for Fibonacci sequence
int result = fibonacci(n - 1) + fibonacci(n - 2);
// Memoize the result for the current value of n
memo.put(n, result);
// Return the calculated result
return result;
}
// O(2^n) Time & O(n) Space
public static int fibonacci(Integer n) {
if (n <= 1) {
return n;
} else {
System.out.println(n);
return fibonacci(n - 1) + fibonacci(n - 2);
}
}
public static void main(String[] args) {
int n = 4;
int result = fibonacci(n);
System.out.println(result);
}
}
- This employs memoization to store the values in runtime and reduces the time complexity in the best case scenario
Parav's Commits
I made a Stock graph which uses the fibonacci retractment lines to show the growth over time and help predict using the slope line drawn for the future. The use of fibonacci helps identify potential turning points in stock prices. This strategic application allows us to uncover hidden patterns and anticipate market movements with a higher degree of accuracy.
Helped working with the stocks API to help create the instance variables needed and setting up the SQlite for the respective APIs being used.
We also made a bubble sort method for the Monthly Stocks to sort the 'high' values for the data by monthly in order of greatest to least to help analyze which month had the greatest increase in price to help make better analysis and trends.
Aditya's Commits
Daily stocks data API
Monthly stocks data API
SQLITE many-to-one relationship to connect monthly and daily data api's for fibonacci sorting
Rohin's Commits
import java.util.HashMap; import java.util.Map;
public class FibonacciSequenceCalculator {
}