Downloads · 30 days
0
Olcay3841/Alpner
Alpner is a machine learning model from Olcay3841. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
import streamlit as st import yfinance as yf import pandas as pd import plotly.graphobjects as go import feedparser
Downloads · 30 days
0
Access
Public
Updated Aug 2, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.md2.2 KB · 59%
From the Hugging Face model README
import streamlit as st import yfinance as yf import pandas as pd import plotly.graph_objects as go import feedparser
st.set_page_config(page_title="ALPNER Strateji", layout="centered")
st.markdown(""" <style> .stMetric { background-color: #161b22; padding: 15px; border-radius: 10px; border: 1px solid #30363d; } </style> """, unsafe_allow_html=True)
st.title("🛡️ ALPNER v1.0") st.caption("Neris & Alperen Gelecek Fonu")
HİSSELER = ["THYAO.IS", "EREGL.IS", "KCHOL.IS", "SAHOL.IS", "SISE.IS", "TUPRS.IS", "ASELS.IS", "BIMAS.IS", "MGROS.IS", "MEYSU.IS", "SASA.IS", "ARCLK.IS", "DOAS.IS", "FROTO.IS"]
@st.cache_data(ttl=1800) def alpner_taramasi(liste): veriler = [] for s in liste: try: h = yf.Ticker(s) inf = h.info fiyat = inf.get('currentPrice') or inf.get('regularMarketPrice') or 0 fk = inf.get('forwardPE') or inf.get('trailingPE') or 0 borc = inf.get('debtToEquity') or 50 if fiyat > 0 and fk > 0: puan = (35 / (fk + 1)) * 10 + (100 - borc) * 0.5 veriler.append({"Hisse": s.replace(".IS", ""), "Fiyat": round(fiyat, 2), "Borç/Öz": round(borc, 1), "Puan": round(puan, 1)}) except: continue return pd.DataFrame(veriler).sort_values(by="Puan", ascending=False)
df = alpner_taramasi(HİSSELER)
if not df.empty: st.subheader("🏆 ALPNER Yıldızları (İlk 3)") top_3 = df.head(3) c1, c2, c3 = st.columns(3) for i, (idx, row) in enumerate(top_3.iterrows()): with [c1, c2, c3][i]: st.metric(label=row['Hisse'], value=f"₺{row['Fiyat']}", delta=f"{row['Puan']} Puan")
st.divider()
st.subheader("📋 Tüm Liste (Güç Sıralı)")
st.dataframe(df[["Hisse", "Fiyat", "Borç/Öz", "Puan"]], use_container_width=True, hide_index=True)
st.subheader("📰 Gündem")
feed = feedparser.parse("https://www.bloomberght.com/rss")
for e in feed.entries[:3]:
with st.expander(f"🔹 {e.title}"):
st.write(f"[Haberi Oku]({e.link})")
else: st.error("Bağlantı bekleniyor...")
st.sidebar.info("Neris & Alperen Gelecek Stratejisi")