Skip to content

Instantly share code, notes, and snippets.

View Polyterative's full-sized avatar

Vlady Yakovenko Polyterative

View GitHub Profile
@Polyterative
Polyterative / Portfolio Optimization and Analysis.py
Last active May 12, 2023 21:31
Portfolio Optimization & Analysis: Python script using historical data to optimize ETF portfolio allocation. Evaluate returns, risk, and Sharpe ratio. Personalize inputs for custom analysis.
import numpy as np
import pandas as pd
import yfinance as yf
etfs = ['SWDA.MI', 'AGGH.MI', 'VECP.MI', 'VGEA.MI', 'RENW.MI', 'EIMI.MI', 'DRVE.MI']
portfolio_amounts = [58.91, 3.74, 12.58, 12.01, 2.89, 7.21, 2.71]
annual_fees = [0.20, 0.10, 0.09, 0.07, 0.49, 0.18, 0.10]
risk_free_rate = 0.02
total_investment = sum(portfolio_amounts)
select all: key(ctrl-a)
undo: key(ctrl-z)
save: key(ctrl-s)
copy: key(ctrl-c)
cut: key(ctrl-x)
drop: key(ctrl-v)
special drop: key(win-v)
# close: key(ctrl-w)
tab right: key(ctrl-tab)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Linq;
using System.Reactive.Subjects;
namespace KeystrokeRedo
{
class Program
{
@Polyterative
Polyterative / custom.js
Last active December 7, 2022 10:53
Serenade script
let intellij = serenade.app("intellij");
let global = serenade.global();
let chrome = serenade.app("chrome");
// Display an alert box with the message "Hello, world!"
// alert("Hello, world!");
// Define global shortcut keys for common actions
global.key("cut", "x", ["ctrl"]); // Cut the selected text
@Polyterative
Polyterative / Angular TS Pastebin.ts
Last active January 5, 2022 14:24
common angular code
constructor(
private dialogRef: MatDialog,
public dataService: DataService,
public router: Router,
public route: ActivatedRoute
) {
this.route.params
.pipe(
$colors: (
'bg': #263137,
'primary': #8EA1BC,
'braces': #6F8796,
'dot': #89DDFF,
'string': #CDCDCD,
'class': #4DB769,
'intreface': #BE89E9,
'variable': #F49446,
'static-field': #E69E6E,
@Polyterative
Polyterative / main 2021.1.ahk
Created November 13, 2021 17:38
Main fulltime autohotkey script
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
;https://www.autohotkey.com/docs/KeyList.htm
;n::o
;o::n
@Polyterative
Polyterative / download-from-undraw.py
Created May 12, 2021 12:00 — forked from heypoom/download-from-undraw.py
Download every svg file from undraw.
#!/usr/bin/env python3
import os
import json
import requests
from multiprocessing.pool import ThreadPool
def build_index():
page = 1
@Polyterative
Polyterative / cloudSettings
Last active August 15, 2021 13:17
VSCode settings
{"lastUpload":"2021-08-15T13:17:53.910Z","extensionVersion":"v3.4.3"}
@Polyterative
Polyterative / angular template variables example
Last active May 12, 2021 12:02
Allows to declare anglar variables in the template to unify subscriptions for example
<div *ngIf='{
userActions:(dataService.userActions$|async)
} as globalBag'
>
<ng-container *ngIf='{
timepointCount:(globalBag.timePoints.length),
widthObject:({"width.%": globalBag.zoomValue+""})
}as lowerBag'
>