overlay the plots, several plots
/////////////////////////

# Overlay the plots
a = security_close * moving_avgs * entry * exit

/////////////////////////

trading cost
/////////////////////////

# The trade cost proceeds are calculated by multiplying the 
# Close price by Entry/Exit Position

df["Portfolio Cash"]=(initial_capital - (df["Close"]*df["Entry/Exit Position"]).cumsum())

# note: extra pair of parentheses???
/////////////////////////

cumulative return, total return
/////////////////////////

# Calculate the Portfolio Cumulative Returns based on the 
# Portfolio Daily Returns

df["Cumulative Ret"]= (1 + df["Daily Ret"]).cumprod() - 1

/////////////////////////

exit plot, .hvplot.scatterr(
/////////////////////////
# Visualize the exit positions relative to the Portfolio Total

exit = df[df["Entry/Exit"] == -1.0]["Portfolio Total"].hvplot.scatter(
    color='orange', marker='v',legend=False, ylabel="Total Portfolio Value",
    width=1000,height=400)

/////////////////////////

R and Excel
////////////////////////////

R and Excel are powerful tools that complement each other in the realm of data 
    analysis and manipulation. While Excel is widely recognized for its 
    spreadsheet-based calculations and user-friendly interface, R Excel 
    in statistical analysis, data visualization, and advanced programming 
    capabilities. 

The integration between R and Excel provides users with a seamless workflow, 
    allowing them to leverage the strengths of both platforms. Analysts often 
    use Excel for data entry, cleaning, and basic calculations before harnessing
    R's statistical functions and sophisticated plotting libraries for in-depth 
    analysis. 

Various packages, such as "openxlsx" and "readxl" facilitate the import and 
    export of data between R and Excel, enabling users to maintain the 
    convenience of Excel for certain tasks while harnessing the analytical
    power of R for more complex statistical modeling and visualization. 
    This interoperability makes R and Excel a dynamic duo for professionals
    who seek the best of both worlds in terms of data manipulation, analysis,
    and reporting.

////////////////////////////